This is the official implementation of:
Zeyi Huang*, Yang Zou*, Vijayakumar Bhagavatula, and Dong Huang, Comprehensive Attention Self-Distillation for Weakly-Supervised Object Detection, NeurIPS 2020, arxiv version.
@article{huang2020comprehensive,
title={Comprehensive Attention Self-Distillation for Weakly-Supervised Object Detection},
author={Huang, Zeyi and Zou, Yang and Kumar, BVK and Huang, Dong},
journal={Advances in Neural Information Processing Systems},
volume={33},
year={2020}
}
- Python == 3.7
- Pytorch == 1.1.0
- Torchvision == 0.3.0
- Cuda == 10.0
- cython
- scipy
- sklearn
- opencv
- GPU: TITAN RTX (24G of memory)
Note: To train with GPU of small memory, CASD_IW is partially parallelized. Fully parallelized version is coming soon. Thanks for your patience.
- Clone the repository
git clone https://github.com/DeLightCMU/CASD.git
- Compile the CUDA code
cd CASD/lib
bash make_cuda.sh
- Download the training, validation, test data and the VOCdevkit
mkdir data
cd data/
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCdevkit_18-May-2011.tar
- Extract all of these tars into one directory named VOCdevkit
tar xvf VOCtrainval_06-Nov-2007.tar
tar xvf VOCtest_06-Nov-2007.tar
tar xvf VOCdevkit_08-Jun-2007.tar
- Create symlinks for PASCAL VOC dataset
cd CASD/data
ln -s VOCdevkit VOCdevkit2007
-
Download pretrained ImageNet weights from here, and put it in the data/imagenet_weights/
-
Download selective search proposals from here, and put it in the data/selective_search_data/
Train a vgg16 Network on VOC 2007 trainval
bash experiments/scripts/train_faster_rcnn.sh 0 pascal_voc vgg16
Test a vgg16 Network on VOC 2007 test
bash experiments/scripts/test_faster_rcnn.sh 0 pascal_voc vgg16
We borrowed code from MLEM, PCL, and Faster-RCNN.