Learning an Invariant and Equivariant Network for Weakly Supervised Object Detection
By Xiaoxu Feng, Xiwen Yao, Hui Shen, Gong Cheng, Junwei Han
Citation
Overview
Visualizations
Qualitative results of the proposed IENet.
Requirements
- python == 3.8
- Cuda == 11.0
- Pytorch == 1.7.0
- torchvision == 0.8.0
- Pillow
- sklearn
- opencv
- scipy
- cython
- GPU: GeForce RTX 3090
Installation
- Clone the IENet repository
git clone https://github.com/XiaoxFeng/IENet.git
- Install libraries
sh install.sh
- Compile
cd IENet/lib
sh make.sh
- Download the Dataset and rename it as VOCdevkit
cd $IENet_ROOT/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_18-May-2011.tar
- Download pretrained ImageNet weights from here, and put it in the $IENet_ROOT/data/pretrained_model/
- Download selective search proposals from here and put it in the $IENet_ROOT/data/selective_search_data/
- Create symlinks for the PASCAL VOC dataset
cd $IENet_ROOT/data
ln -s $VOCdevkit VOC2007
ln -s $VOCdevkit VOC2012
Usage
Train a IENet. For example, train a VGG16 network on VOC 2007 trainval
CUDA_VISIBLE_DEVICES=0 python tools/train_net_step.py --dataset voc2007 \
--cfg configs/baselines/vgg16_voc2007.yaml --bs 1 --nw 4 --iter_size 4
Test a IENet. For example, test the VGG 16 network on VOC 2007:
CorLoc
CUDA_VISIBLE_DEVICES=0 python tools/test_net.py --cfg configs/baselines/vgg16_voc2007.yaml \
--load_ckpt Outputs/vgg16_voc2007/$MODEL_PATH \
--dataset voc2007trainval
mAP
CUDA_VISIBLE_DEVICES=0 python tools/test_net.py --cfg configs/baselines/vgg16_voc2007.yaml \
--load_ckpt Outputs/vgg16_voc2007/$model_path \
--dataset voc2007test
Download models
Models trained on PASCAL VOC 2007, MS COCO2014, and MS COCO 2017 can be downloaded here:Google Drive.
Acknowledgement
We borrowed code from PCL, and Faster-RCNN.