A pytorch implementation of Fine-Grained Classification via Hierarchical Bilinear Pooling with Aggregated Slack Mask (HBPASM).
- python 2.7
- pytorch 0.4.1
Step 1.
-
Download the resnet-34 pre-training parameters. resnet34-parameters-download or resnet34-parameters-download
-
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 and proj-layer only.
- python train_firststep.py
Step 4. Fine-tune all layers. It gets an accuracy of around 87% on CUB-200-2011 when using resnet-34.
- python train_finetune.py
Visualization of independent masks and the aggregated mask generated on three convolutional layers. The aggregated mask generates better RoIs with fewer background regions owing to the combination of the multiple mask maps.