Home

Awesome

iNaturalist Competition 2018 Training Code

This code finetunes an Inception V3 model (pretrained on ImageNet) on the iNaturalist 2018 competition dataset.

Training

The network was trained on Ubuntu 16.04 using PyTorch 0.3.0. Each training epoch took about 1.5 hours using a GTX Titan X.
The links for the raw data are available here. We also provide a trained model that can be downloaded from here. Every epoch the code will save a checkpoint and the current best model according to validation accuracy.
Training for 75 epochs results in a top one accuracy of 60.20% and top three of 77.91% on the validation set.

Ideas for Improvement

Submission File

By setting the following flags it's possible to generate a submission file for the competition.

    evaluate = True
    save_preds = True
    resume = 'model_path/iNat_2018_InceptionV3.pth.tar'  # path to trained model
    val_file = 'ann_path/test2018.json'                  # path to test file
    data_root = 'data_path/inat2018/images/'             # path to test images
    op_file_name = 'inat2018_test_preds.csv'             # submission filename