This folder contains the implementation of the fine-grained image classification experiments.
Our implementation is based on the Pytorch version code of WS-DAN.
Download CUB-200-2011 dataset from this link and move the uncompressed data folder to ./CUB-200-2011
. The data structure should be:
./CUB-200-2011
└─── images.txt
└─── image_class_labels.txt
└─── train_test_split.txt
└─── images
└─── 001.Black_footed_Albatross
└─── Black_Footed_Albatross_0001_796111.jpg
└─── ...
└─── 002.Laysan_Albatross
└─── ...
Download Stanford Cars dataset from this link and move the uncompressed data folder to ./stanford_cars
. The data structure should be:
-/stanford_cars
└─── cars_test
└─── 00001.jpg
└─── 00002.jpg
└─── ...
└─── cars_train
└─── 00001.jpg
└─── 00002.jpg
└─── ...
└─── devkit
└─── cars_train_annos.mat
└─── cars_test_annos_withlabels.mat
Download FGVC-Aircraft dataset from this like and move the uncompressed data folder to ./fgvc-aircraft-2013b
. The data structure should be:
./fgvc-aircraft-2013b/data/
└─── images
└─── 0034309.jpg
└─── 0034958.jpg
└─── ...
└─── variants.txt
└─── images_variant_trainval.txt
└─── images_variant_test.txt
- Modify
config_distributed.py
to run experiments on different datasets - Run
bash train_distributed.sh
to train models. - Set configurations in
config_infer.py
and runpython infer.py
to conduct multi-crop evaluation.
- Python 3
- PyTorch 1.0+
- Apex