Skip to content

Top 3% (3/126) solution for iWildCam 2020 competition, CVPR2020 workshop

Notifications You must be signed in to change notification settings

wassryan/iWildCam_2020_FGVC7

Repository files navigation

iWildCam_2020 FGVC7

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

Requirements

  • Python 3.6
  • pytorch 1.4.0

About the Code

1. Prepare Data

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

2. Train the Model

  1. for classification model(e.g. resnet, resnext, efficientnet...)
python train_model224.py -cfg configs/efficientNet.yaml
  1. for NTS model
python train.py

3. Prediction

python infer224.py/infer.py

4. Train Cross Model

if you want to train K-cross validation model, and infer it

  1. use gen_kcross.py to create kcross train.json/val.json
  2. then train and infer it
# first set CROSS_VALIDATION as True in xxx.yaml, then 
python train_model224.py
python infer_crossmodel.py

5. Ensemble models

use model_ensemble.py

What Have not been released

  1. data sample used for long-tail methods
  2. auxiliary classifier head(for location)

Result Table

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

About

Top 3% (3/126) solution for iWildCam 2020 competition, CVPR2020 workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages