Git Product home page Git Product logo

poisonbox / oim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bigvideoresearch/oim

0.0 1.0 0.0 9.17 MB

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

License: MIT License

CMake 1.16% Makefile 0.28% Dockerfile 0.03% HTML 0.08% CSS 0.10% Jupyter Notebook 56.68% C++ 33.05% Shell 0.35% Python 5.08% Cuda 2.71% MATLAB 0.42% Batchfile 0.06% PowerShell 0.01% C 0.01%

oim's Introduction

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

oim's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.