Using UNet and PyTorch Lightning to detect Contrails in Images

Using UNet and PyTorch Lightning to detect Contrails in Images

Using an image segmentation approach to tackle the Contrail Detection Kaggle competition by Google Research

This is part 1 in a short series of notebooks that will aim to tackle the Kaggle competition of predicting the presence of contrails in infrared image bands. The competition itself was hosted by Google Research and has since ended.

#176 - Right-angled triangles that share a cathetus

The four right-angled triangles with sides (9, 12, 15), (12, 16, 20), (5, 12, 13) and (12, 35, 37) all have one of the shorter sides (catheti) equal to 12. It can be shown that no other integer sided right-angled triangle exists with one of the catheti equal to 12.

Find the smallest integer that can be the length of a cathetus of exactly 47547 different integer sided right-angled triangles.


#282 - The Ackermann Function

For non-negative integers $m$, $n$, the Ackermann function $A(m, n)$ is defined as follows: \[A(m, n) = \begin{cases} n + 1\quad\quad &\text{if }m = 0 \\ A(m - 1, 1)\quad\quad &\text{if }m > 0\text{ and }n = 0 \\ A(m - 1, A(m, n - 1))\quad\quad &\text{if }m > 0\text{ and }n > 0 \end{cases}\]

For example $A(1, 0) = 2$, $A(2, 2) = 7$ and $A(3, 4) = 125$.

Find $\displaystyle\sum_{n=0}^6 A(n, n)$ and give your answer mod $14^8$.

#285 - Pythagorean Odds

Albert chooses a positive integer $k$, then two real numbers $a$, $b$ are randomly chosen in the interval $[0, 1]$ with uniform distribution. The square root of the sum $(k\cdot a + 1)^2 + (k\cdot b + 1)^2$ is then computed and rounded to the nearest integer. If the result is equal to $k$, he scores $k$ points; otherwise he scores nothing.

For example, if $k=6$, $a=0.2$ and $b=0.85$, then $(k\cdot a + 1)^2 + (k\cdot b + 1)^2 = 42.05$. The square root of $42.05$ is $6.484\cdots$ and when rounded to the nearest integer, it becomes $6$. This is equal to $k$, so he scores $6$ points.

It can be shown that if he plays 10 turns with $k=1, k=2, \dots, k=10$, the expected value of his total score, rounded to five decimal places, is $10.20914$.

If he plays $10^5$ turns with $k=1,k=2,k=3,\dots,k=10^5$, what is the expected value of his total score, rounded to five decimal places?

Wildfire Incidence III - Basic Neural Network

Wildfire Incidence III - Basic Neural Network

Part 3 of predicting wildfire incidence. I show a basic example of using a neural network on the same data for prediction.

We have seen how to properly preprocess the 3 data sources (historical wildfire incidence, climatology, and land usage) to get it ready to push it through a logistic regression model. However, the beauty of machine learning is that there is often more than one tool for the job.

Wildfire Incidence Prediction - Part II - Spatial Logistic Regression

Wildfire Incidence Prediction - Part II - Spatial Logistic Regression

Part 2 of predicting wildfire incidence. After preprocessing, we perform spatial logistic regression using all the data on hand.

This is second in a series of posts detailing how to predict incidence of wildfires. For input data, we use historical wildfires, land usage data, and climatology data. In terms of preprocessing, we force all datasets to have the same 702 x 306 shape. The fire matrix contains a count of how many fires have occurred in that location. Please see Wildfire Incidence I - Preprocessing for a detailed code overview of the actual preprocessing.

Wildfire Incidence Prediction - Part I - Preprocessing

Wildfire Incidence Prediction - Part I - Preprocessing

Part 1 of predicting wildfire incidence. This goes over preprocessing all the input data (wildfires, land usage, and climatology).

These series of blog posts will go over our methods for predicting wildfires across the United States given historical wildfire incidences, land usage data, and high-resolution climatology data. Please refer to the Wildfire Incidence Prediction (CU) to learn more about an overview of the project, including the presentation and the submitted final report.

#138 - Special isosceles triangles

Consider the isosceles triangle with base length, $b=16$, and legs, $L=17$.

p138

By using the Pythagorean theorem it can be seen that the height of the triangle, $h=\sqrt{17^2-8^2}=15$, which is one less than the base length.

With $b=272$ and $L=305$, we get $h=273$, which is one more than the base length, and this is the second smallest isosceles triangle with the property that $h=b\pm1$.

Find $\sum L$ for the twelve smallest isosceles triangles for which $h=b\pm1$ and $b,L$ are positive integers.


#187 - Semiprimes

A composite is a number containing at least two prime factors. For example, $15=3\times5$; $9=3\times 3$; $12=2\times 2\times 3$.

There are ten composites below thirty containing precisely two, not necessarily distinct, prime factors: 4, 6, 9, 10, 14, 15, 21, 22, 25, 26.

How many composite integers, $n<10^8$, have precisely two, not necessarily distinct, prime factors?


#173 - Using up to one million tiles how many different 'hollow' square laminae can be formed?

We shall define a square lamina to be a square outline with a square “hole” so that the shape possesses vertical and horizontal symmetry. For example, using exactly thiry-two square tiles we can form two different square lamina.

lamina

With one-hundred tiles, and not necessarily using all of the tiles at one time, it is possible to form forty-one different square laminae.

Using up to one million tiles how many different square laminae can be formed?


Pagination