Skip to content

Object Instance Mining for Weakly Supervised Object Detection (AAAI 2020)

License

Notifications You must be signed in to change notification settings

bigvideoresearch/OIM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Instance Mining for Weakly Supervised Object Detection

Chenhao Lin, Siwen Wang, Dongqi Xu, Yu Lu*, Wayne Zhang.

SenseTime Research, SenseTime.

  • Note that * means the corresponding author.

Overview of OIM

Object Instance Mining (OIM) for weakly supervised object detection that effectively mines all possible instances with only image-level annotation using spatial and appearance graphs.

The paper has been accepted by AAAI 2020. For more details, please refer to our paper.

OIM architecture

Object Instance Mining

Getting started

Requirements

  1. Requirements for Caffe and pycaffe (see: Caffe installation instructions)

Note: Caffe must be built with support for Python layers!

# In your Makefile.config, make sure to have this line uncommented
WITH_PYTHON_LAYER := 1
  1. Python packages you might not have: cython, python-opencv, easydict
  2. MATLAB

Installation

  1. Clone the OIM repository
# Make sure to clone with --recursive
git clone --recursive https://github.com/XXXXX
  1. Build the Cython modules
cd $OIM_ROOT/lib
make
  1. Build Caffe and pycaffe
cd $OIM_ROOT/caffe-oim
# Following the Caffe installation instructions here:
#   http://caffe.berkeleyvision.org/installation.html
make all -j
make pycaffe

Train

  1. Download VOCdevkit datasets
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. Get pre-computed Selective Search object proposals and put into $OIM_ROOT/data/selective_search_data.
cd $OIM_ROOT
./data/scripts/fetch_selective_search_data.sh
  1. Download ImageNet pre-trained models available in the Caffe Model Zoo.
cd $OICR_ROOT
./data/scripts/fetch_imagenet_models.sh
  1. Train on VOC 2007 trainval:
./tools/train_oim.sh oim_train models/VGG16/solver.prototxt 0.2 0.2 5.0 data/imagenet_models/$VGG16_model_name
  1. Test and evaluate on VOC 2007 trainval and test:

On trainval

./tools/val_oim.sh oim_trainval models/VGG16/test.prototxt output/oim_train_st2/voc_2007_trainval/vgg16_oim_st2_iter_20000.caffemodel

On test

./tools/test_oim.sh oim_test models/VGG16/test.prototxt output/oim_train_st2/voc_2007_trainval/vgg16_oim_st2_iter_20000.caffemodel

Evaluation

For mAP, run the python code tools/reval.py

./tools/reval.py $output_dir --imdb voc_2007_test --matlab

For CorLoc, run the python code tools/reval_discovery.py

./tools/reval_discovery.py $output_dir --imdb voc_2007_trainval

Sample Rrsults

Some OIM sample results

Some OIM visualization results.

Citation

@inproceedings{lin2020object,
  title={Object Instance Mining for Weakly Supervised Object Detection},
  author={Chenhao Lin, Siwen Wang, Dongqi Xu, Yu Lu, Wayne Zhang},
  journal={arXiv preprint arXiv:2002.01087},
  year={2020}
}

License

Copyright (c) 2019-present SenseTime Research.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

References

About

Object Instance Mining for Weakly Supervised Object Detection (AAAI 2020)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published