Code release for the paper "Channel DropBlock: An Improved Regularization Method for Fine-Grained Visual Classification" (BMVC2021).
Python 3.6 with all of the pip install -r requirements.txt
packages including:
torch == 1.3.1
opencv-python
- Download the FGVC image data. Extract them to
data/cars/
,data/birds/
anddata/airs/
, respectively. Organize the structure as follows:
dataset/
└── train/
└── class1/
└── img1.jpg
└── img2.jpg
└── ...
└── ...
└── test/
└── class1/
└── img1.jpg
└── img2.jpg
└── ...
└── ...
- For the CUB-200-2011 dataset, run
python train_birds+.py --model {resnet50,vgg19} --cdb {none,max_activation,bilinear_pooling} [options: --visualize]
to start training. - For the Stanford-Cars dataset, run
python train_cars.py --model {resnet50,vgg19} --cdb {none,max_activation,bilinear_pooling} [options: --visualize]
to start training. - For the FGVC-Aircraft dataset, run
python train_airs.py --model {resnet50,vgg19} --cdb {none,max_activation,bilinear_pooling} [options: --visualize]
to start training. - Run
python {train_birds+.py, train_cars.py, train_airs.py} --help
to see full input arguments.
Visualize:
- Visualize online attention dropped/remianed feature maps under folder
visual/
.