A reimplementation of Hierarchical Bilinear Pooling for Fine-Grained Visual Recognition in Resnet.
- python 2.7
- pytorch 0.4.1
Step 1.
-
Download the resnet pre-training parameters.
-
Download the CUB-200-2011 dataset. CUB-download
Step 2.
- Set the path to the dataset and resnet parameters in the code.
Step 3. Train the fc layer only.
- python train_firststep.py
Step 4. Fine-tune all layers. It gets an accuracy of around 86% on CUB-200-2011 when using resnet-50.
- python train_finetune.py