Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macaodha/inat_comp_2018
CNN training code for iNaturalist 2018 image classification competition
https://github.com/macaodha/inat_comp_2018
Last synced: 8 days ago
JSON representation
CNN training code for iNaturalist 2018 image classification competition
- Host: GitHub
- URL: https://github.com/macaodha/inat_comp_2018
- Owner: macaodha
- Created: 2018-02-12T21:49:47.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-10T15:43:00.000Z (over 1 year ago)
- Last Synced: 2024-08-01T15:30:14.640Z (3 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 82
- Watchers: 8
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# iNaturalist Competition 2018 Training Code
This code finetunes an Inception V3 model (pretrained on ImageNet) on the iNaturalist 2018 competition [dataset](https://github.com/visipedia/inat_comp).### 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](https://github.com/visipedia/inat_comp).
We also provide a trained model that can be downloaded from [here](https://data.caltech.edu/records/7e9te-sae53/files/iNat_2018_InceptionV3.pth.tar).
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
* Train/test on higher resolution images.
* Make use of the taxonomy at training time (already included in data loader).
* Address long tail distribution.### Submission File
By setting the following flags it's possible to generate a submission file for the competition.
```python
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
```