This repository contains 2nd place solution for the Computer Vision Hackathon Game of Deep Learning organised by Analytics Vidhya.
Ship or vessel detection has a wide range of applications, in the areas of maritime safety, fisheries management, marine pollution, defence and maritime security, protection from piracy, illegal migration, etc.
Keeping this in mind, a Governmental Maritime and Coastguard Agency is planning to deploy a computer vision based automated system to identify ship type only from the images taken by the survey boats. You have been hired as a consultant to build an efficient model for this project.
There are 6252 images in train and 2680 images in test data. The categories of ships and their corresponding codes in the dataset are as follows -
There are 5 classes of ships to be detected which are as follows:
- Cargo
- Military
- Carrier
- Cruise
- Tankers
Weighted F1 score
-
Each model is trained in 3 stages using progressive resizing :
128x128 -> 256*256 -> 299x299
-
Various combinations of techniques were used like
Training on FP16
,Data Augmentations(flip left right, random zoom and crop, etc)
,Mixup
withFocal Loss
andFlattenedLoss of CrossEntropyLoss
. -
Final Submission was generated using
Final Blending
notebook. UsedAvg of predictions of 3 models
for final submission as it performed better on Public LB.
Model | Public LB Score | Private LB Score |
---|---|---|
ResNet50 | 0.98127 | 0.97129 |
ResNeXt50 | 0.98320 | 0.97822 |
SeResNeXt50 | 0.98031 | 0.98066 |
Avg of predictions of 3 models | 0.98599 | 0.98567 |
Avg of TTA predictions of 3 models | 0.98410 | 0.98815 |
- Public LB : 0.98599 & 6th out of 2083 participants
- Private LB : 0.98567 & 2nd out of 2083 participants
fastai==1.0.52
pretrainedmodels==0.7.4
Models were trained on Colab using Python 3
notebooks, so other necessary packages were already installed.
- Extract
train.zip
indata
folder and remove_MACOSX
andtrain.zip
file. - Run the notebooks
Final_ResNet50
,Final_ResNeXt50
andFinal_SeResNeXt50
. - Run the
Final_Blending
notebook on the generated outputs from the three notebooks.
Also predicted probabilities of the three models are provided in PredictedProbabilities
folder and the two submission files are provided in FinalSubmission
folder