The challenge provides a dataset of
-
12,500 Cat photos
-
12,500 Dog photos
and then asks us to predict the category of 12,500 test images (Cat or Dog). The submission is evaluated based on log loss (smaller is better):
As shown in the figure below, my approach will be as follows:
-
Use a pretrained imagenet model (e.g. resnet-152)
-
Replace the last fully-connected layer with a new one with binary output, while freezing the rest of the layers and train on the given image dataset.
-
Unfreeze a few preceding layers and retrain for further fine-tuning.
As in some other projects, I'll use Pytorch , which I am increasingly a fan of.
Here's the link to the notebook: https://nbviewer.jupyter.org/github/sangeetkar/cats_vs_dogs_kaggle/blob/master/cnet.ipynb