# Our 7th place solution

First many thanks to Kaggle and CDiscount to host this very interesting competition.
Congratulations to the prize winners, your performances are impressive and I look forward to read your solution.
A special kudos to Heng CherKeng for all your sharings, your comments. You are definitely #1 in this competition in style!
Thanks to my team: Kyle, alup and voglinio, it was a pleasure to work and share together. Special kudo to Kyle whose ensembling speed was very impressive.
Here a a quick summary of our solution. It is a combination of 3 things:
Baseline CNN models: InceptionResnetv2, Resnet101, SE-InceptionV3, Xception. These models got performance from .69+ to .72+
We extracted the bottleneck features from these models, group them by product (+padding) to shape (bs, 4, dim_features) and train different models to combine the images and classify the object. I shared my top level models here
[https://www.kaggle.com/lamdang/models-to-combine-images-and-predict-items](https://www.kaggle.com/lamdang/models-to-combine-images-and-predict-items)
RNN: LSTM and GRU
flat model: just flatten the inputs and put dense layers on top
NetVlad: implementation based on
[https://arxiv.org/abs/1706.06905](https://arxiv.org/abs/1706.06905)
and
[https://arxiv.org/abs/1511.07247](https://arxiv.org/abs/1511.07247)
. Also from
[https://github.com/antoine77340/LOUPE](https://github.com/antoine77340/LOUPE)
. Kudos to Antoine Miech and Inria researchers on this great work.
These models individually get around .73-.74, when averaged get around .75
Doing this previous steps and ensembling across baseline model get around .77
We extracted text box with EAST
[https://github.com/argman/EAST](https://github.com/argman/EAST)
and did OCR with
[https://github.com/meijieru/crnn.pytorch](https://github.com/meijieru/crnn.pytorch)
. We did not do language modelling correction after on the output. This boost the score further by ~0.01. We only take the detection and ocr model out of the box and did not retrain, further tuning of these models on this dataset may improve the performance and give extraboost to the global model.
Also, we could only manage to use the text in bag of char ngram fashion. Other way of exploiting it could also improve the result.
So that is, globally it is quite simple. I am really happy to learn about some really nice aggregation techniques like NetVlad and text detection/OCR models.