Home

Awesome

Setup

Install Package Dependencies

torch
torchvision 
PyYAML
easydict
tqdm
scikit-learn
efficientnet_pytorch
pandas
opencv

Datasets

create a soft link to the dataset directory

CUB dataset

ln -s /your-path-to/CUB-dataset data/cub

Training (Backbone: ResNet50, Dataset: CUB)

python main.py --config config/sps-single-branch-cub.yml --gpu_ids 0 # Train the network that contains one mid-level branch

Best accuracy: 88.70%

Results of the last three epochs

EpochH-levelM-level(SPS)H-level+M-level(SPS)
15885.76%87.21%88.51%
15986.18%87.37%88.32%
16085.99%87.33%88.63%

python main.py --config config/sps-two-branch-cub.yml --gpu_ids 0 # Train the network that contains two mid-level branches

Best accuracy: 88.82%

Results of the last three epochs

EpochH-levelM-level(SPS)-0M-level(SPS)-1H-level+2xM-level(SPS)
15885.76%87.82%87.33%88.64%
15985.83%87.66%87.28%88.57%
16085.42%87.68%88.52%88.70%

*** The full training log can be found in the folder logs/ ***