Top 3% (3/126) solution for iWildCam 2020 competition (Categorize animals in the wild), which is a part of the FGVC7 workshop at CVPR 2020
- Python 3.6
- pytorch 1.4.0
Download the competition data from kaggle website
crop data
python fast_crop_image.py # crop data from images
prepare json for train/val
python prepare_data.py
prepare json for test data
python sort_images.py
- for classification model(e.g. resnet, resnext, efficientnet...)
python train_model224.py -cfg configs/efficientNet.yaml
- for NTS model
python train.py
python infer224.py/infer.py
if you want to train K-cross validation model, and infer it
- use gen_kcross.py to create kcross train.json/val.json
- then train and infer it
# first set CROSS_VALIDATION as True in xxx.yaml, then
python train_model224.py
python infer_crossmodel.py
use model_ensemble.py
- data sample used for long-tail methods
- auxiliary classifier head(for location)
train epochs | Private Score. | Public Score. | |
---|---|---|---|
EfficientNet-B0 | 36 | 83.6 | 82.6 |
ResNet-50 | 36 | 83.5 | 82.3 |
NTS-Net | 36 | 84.6 | 84.0 |
SEResnext101 | 36 | 82.6 | 82.8 |
Ensemble | 36 | 84.7 | 84.5 |