# Abridged task description
We are given many real-life images of a chicken farm. We are asked to count the number of chickens in each image. To make the task easier, the labelled training data gives us a density map where each pixel is a value representing how many chickens are in that pixel (note that this value is almost always fractional, like 0.005). It is guaranteed that the sum of all pixel values in the density map is equal to the true number of chickens in the image.
For each test data image, we should output a density map. For scoring, the sum of the pixel values in the density map is compared to the true number of chickens in the image.
In the baseline solution, we are given a pretrained encoder model.
# Unofficial writeup
# 88 points
Credit: Australia
Instead of implementing a decoder for the problem’s pretrained encoder,, we swap out the encoder for a pre-trained ResNet50 base. This worked probably because ResNet50 is very good at recognising features in real-life images. We freeze ResNet50’s parameters and remove the final two layers, which seem to be mostly useful for classification.
We connect our modified ResNet to a U-Net segmentation model. The U-net will help us output a correct density map. We then train our model on the images and their corresponding ground truth density maps.
Additional note: In some cases, the outputted density map would count a negative number of chickens. In order to fix this, we should put ReLU activation over the final layer of our model (i.e. clamping to non-negative values)