Colorize
Languages en svYour friend Leo likes to take pictures with his new camera. After taking a lot of pictures, he realized that some of them were corrupted and he could only save grayscale versions. He now wants to colorize those images so they look like the originals.
To do this, he wants to train an AI model on the non-corrupted images and use it to colorize the corrupted ones. The only problem is that Leo does not know much about AI, so he has asked you for help.
Input
The attachments contain the following files:
-
train.zip - A zip file containing non-corrupted images, along with their corrupted version.
-
test.zip - A zip file containing the corrupted images that Leo wants to colorize.
-
baseline.ipynb - A basic solution to the task. It appends its own source code to the submission.
-
print_source_code.py - A utility script to print your source code as a comment, useful for including your solution in the submission file. Does not work inside a Jupyter Notebook.
-
LICENSE.txt - License and attribution notice for the image assets (CC BY-NC 4.0).
Image assets in this task are licensed under CC BY-NC 4.0, and attribution records are maintained by the organizers.
Output
For each corrupted image in test.zip, you should print your predicted color values for some pixels as integers. Values can be separated by spaces or line breaks.
The exact logic, also implemented in baseline.ipynb, is as follows:
-
Read test images in sorted filename order.
-
For each image, loop over pixels with x first and y second.
-
Keep only the pixels where the running counter is divisible by 131 (same rule as baseline.ipynb).
-
For each kept pixel, print R G B.
Every printed value must be an integer in the range $0$ to $255$ inclusive.
Scoring
Your solution will be scored based on the Mean Squared Error (MSE) between your predicted color values and the original image’s color values for each evaluated pixel in the image.
The MSE is computed on a set of samples as follows. Let $N$ be the number of samples, $g_i$ be your predicted value for the $i$-th entry and $t_i$ be the true value from the original image. Then,
\[ \text{MSE} = \frac{1}{N} \sum _{i=1}^{N} (g_i - t_i)^2. \]Your score increases linearly from $0$ to $100$ as your MSE decreases from $666$ to $567$. In particular, an MSE of $666$ or greater results in $0$ points, and $567$ or lower results in $100$ points.
More formally, the score is calculated using the formula:
\[ \text{Score} = 100 \cdot \max \left(0, \min \left(1, \frac{666 - \text{MSE}}{99} \right)\right) \]Testing
During the contest, your solution will be scored on $30\% $ of the data in test.zip. After the contest ends, all solutions will be re-scored on the remaining $70\% $ of the data. It is guaranteed that test.zip was split into the two sets uniformly at random, with no overlap between the sets. This means that your score during the contest should be seen as a strong indicator of your final score, but might differ if you overfit.
