# 12th place solution

![enter image description here](assets/74cd46cae5f15bad024ba8c5.jpeg)
(each bar represents an image)
There are duplicate images in train and test and a set of images is shared between them (data leak). The easiest way to find them is to calculate md5 hash for each image.
[https://github.com/ternaus/kaggle_cdiscount/blob/master/find_md5_train.py](https://github.com/ternaus/kaggle_cdiscount/blob/master/find_md5_train.py)
[https://github.com/ternaus/kaggle_cdiscount/blob/master/find_md5_test.py](https://github.com/ternaus/kaggle_cdiscount/blob/master/find_md5_test.py)
This allows:
Significantly decrease the size of the train and test speeding up training and inference: 12m => 7.5m, 3m => 2m
Get class labels from train for images in test
After this, I trained Resnet 50, 101 and 152, on 160x160 crops, dropping learning rate on the plateau.
At the first epoch, all layers except last are frozen.
For each model test time augmentation + geometric mean=> 0.75 on LB
Geometric mean of the previous step => 0.77 on LB