Home

Awesome

LBBA-boosted WSOD

Summary

Our code is based on ruotianluo/pytorch-faster-rcnn and WSCDN

Sincerely thanks for your resources.

Newer version of our code (based on Detectron 2) work in progress.

Hardware

We use one RTX 2080Ti GPU (11GB) to train and evaluate our method, GPU with larger memory is better (e.g., TITAN RTX with 24GB memory)

Requirements

We provide a full requirements.txt (namely lbba.yml) in the workspace.

Additional resources

Google Drive

Description

Prepare

Environment

We use Anaconda to construct our experimental environment.

Install all required packages (or simply follow lbba_requirements.txt).

Essential Data

We have initialized all directories with gitkeep files.

first, cd lbba_boosted_wsod

then, download selective_search_data/* into data/selective_search_data

download pretrained_models/imagenet_pretrain/* into data/imagenet_weights

download pretrained_models/pretrained_on_wsddn/* into data/wsddn_weights

Datasets

Same with rbgirshick/py-faster-rcnn

For example, PASCAL VOC 2007 dataset

  1. Download the training, validation, test data and VOCdevkit

    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/voc2007/VOCdevkit_08-Jun-2007.tar
    
  2. 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
    
  3. It should have this basic structure

    $VOCdevkit/                           # development kit
    $VOCdevkit/VOCcode/                   # VOC utility code
    $VOCdevkit/VOC2007                    # image sets, annotations, etc.
    # ... and several other directories ...
    
  4. Create symlinks for the PASCAL VOC dataset

    cd $FRCN_ROOT/data
    ln -s $VOCdevkit VOCdevkit2007
    

Evaluate our WSOD

Download models/voc07/voc07_55.8.pth to lbba_boosted_wsod/

./test_voc07.sh 0 pascal_voc vgg16 voc07_55.8.pth

Note that different environments might result in a slight performance drop. For example, we obtain 55.8 mAP with CUDA 10.1 but obtain 55.5 mAP using the same code with CUDA 11.

Train WSOD

Download models/lbba/lbba_final.pth (or lbba_init.pth) to lbba_boosted_wsod/

bash train_wsod.sh 1 pascal_voc vgg16 voc07_wsddn_pre lbba_final.pth

Note that we provide different LBBA checkpoints (initialization stage, final stage, or even one-class adjuster mentioned in the suppl.).

Citation

@InProceedings{Dong_2021_ICCV,
    author    = {Dong, Bowen and Huang, Zitong and Guo, Yuelin and Wang, Qilong and Niu, Zhenxing and Zuo, Wangmeng},
    title     = {Boosting Weakly Supervised Object Detection via Learning Bounding Box Adjusters},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2021},
    pages     = {2876-2885}
}