Skip to content

Codes for Learning an Invariant and Equivariant Network for Weakly Supervised Object Detection

Notifications You must be signed in to change notification settings

XiaoxFeng/IENet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning an Invariant and Equivariant Network for Weakly Supervised Object Detection

By Xiaoxu Feng, Xiwen Yao, Hui Shen, Gong Cheng, Junwei Han

Citation

Overview

Overview

Visualizations

Qualitative results of the proposed IENet.

Visualizations

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

  1. Clone the IENet repository
git clone https://github.com/XiaoxFeng/IENet.git
  1. Install libraries
sh install.sh
  1. Compile
cd IENet/lib
sh make.sh
  1. 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
  1. 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
  1. Download pretrained ImageNet weights from here, and put it in the $IENet_ROOT/data/pretrained_model/
  2. Download selective search proposals from here and put it in the $IENet_ROOT/data/selective_search_data/
  3. 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.

About

Codes for Learning an Invariant and Equivariant Network for Weakly Supervised Object Detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages