All Projects → ppengtang → Oicr

ppengtang / Oicr

Licence: mit
Caffe codes for our papers "Multiple Instance Detection Network with Online Instance Classifier Refinement" and "PCL: Proposal Cluster Learning for Weakly Supervised Object Detection".

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Oicr

Vip
Video Platform for Action Recognition and Object Detection in Pytorch
Stars: ✭ 175 (-10.71%)
Mutual labels:  object-detection
Ultimatelabeling
A multi-purpose Video Labeling GUI in Python with integrated SOTA detector and tracker
Stars: ✭ 184 (-6.12%)
Mutual labels:  object-detection
Sarosperceptionkitti
ROS package for the Perception (Sensor Processing, Detection, Tracking and Evaluation) of the KITTI Vision Benchmark Suite
Stars: ✭ 193 (-1.53%)
Mutual labels:  object-detection
Object Detection Api
Yolov3 Object Detection implemented as APIs, using TensorFlow and Flask
Stars: ✭ 177 (-9.69%)
Mutual labels:  object-detection
Yolov3 Tf2
YoloV3 Implemented in Tensorflow 2.0
Stars: ✭ 2,327 (+1087.24%)
Mutual labels:  object-detection
Awesome Video Object Detection
This is a list of awesome articles about object detection from video.
Stars: ✭ 190 (-3.06%)
Mutual labels:  object-detection
Yolo v3 tutorial from scratch
Accompanying code for Paperspace tutorial series "How to Implement YOLO v3 Object Detector from Scratch"
Stars: ✭ 2,192 (+1018.37%)
Mutual labels:  object-detection
Viseron
Self-hosted NVR with object detection
Stars: ✭ 192 (-2.04%)
Mutual labels:  object-detection
Frcnn
Faster R-CNN / R-FCN 💡 C++ version based on Caffe
Stars: ✭ 183 (-6.63%)
Mutual labels:  object-detection
Py R Fcn Multigpu
Code for training py-faster-rcnn and py-R-FCN on multiple GPUs in caffe
Stars: ✭ 192 (-2.04%)
Mutual labels:  object-detection
Torchdistill
PyTorch-based modular, configuration-driven framework for knowledge distillation. 🏆18 methods including SOTA are implemented so far. 🎁 Trained models, training logs and configurations are available for ensuring the reproducibiliy.
Stars: ✭ 177 (-9.69%)
Mutual labels:  object-detection
Bmw Yolov4 Inference Api Cpu
This is a repository for an nocode object detection inference API using the Yolov4 and Yolov3 Opencv.
Stars: ✭ 180 (-8.16%)
Mutual labels:  object-detection
Layout Parser
A Python Library for Document Layout Understanding
Stars: ✭ 191 (-2.55%)
Mutual labels:  object-detection
Vdetlib
Video detection library
Stars: ✭ 177 (-9.69%)
Mutual labels:  object-detection
Deepdetect
Deep Learning API and Server in C++14 support for Caffe, Caffe2, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE
Stars: ✭ 2,306 (+1076.53%)
Mutual labels:  object-detection
Vision3d
Research platform for 3D object detection in PyTorch.
Stars: ✭ 177 (-9.69%)
Mutual labels:  object-detection
Spoonn
FPGA-based neural network inference project with an end-to-end approach (from training to implementation to deployment)
Stars: ✭ 186 (-5.1%)
Mutual labels:  object-detection
Deep Learning With Python
Deep learning codes and projects using Python
Stars: ✭ 195 (-0.51%)
Mutual labels:  object-detection
Person Detection And Tracking
A tensorflow implementation with SSD model for person detection and Kalman Filtering combined for tracking
Stars: ✭ 193 (-1.53%)
Mutual labels:  object-detection
Yolov3 Object Detection With Opencv
This project implements a real-time image and video object detection classifier using pretrained yolov3 models.
Stars: ✭ 191 (-2.55%)
Mutual labels:  object-detection

Multiple Instance Detection Network with Online Instance Classifier Refinement

By Peng Tang, Xinggang Wang, Xiang Bai, and Wenyu Liu.

The code to train and eval OICR using PyTorch as backend is available here. Thanks Vadim!

We have released the caffe codes of our PCL work here and PyTorch codes here. The PCL is the extension of OICR and obtains better performance than OICR!

Introduction

Online Instance Classifier Refinement (OICR) is a framework for weakly supervised object detection with deep ConvNets.

  • It achieves state-of-the-art performance on weakly supervised object detection (Pascal VOC 2007 and 2012).
  • Our code is written by C++ and Python, based on Caffe, fast r-cnn, and faster r-cnn.

The paper has been accepted by CVPR 2017. For more details, please refer to our paper.

Architecture

OICR architecture

Results

Method VOC2007 test mAP VOC2007 trainval CorLoc VOC2012 test mAP VOC2012 trainval CorLoc
OICR-VGG_M 37.9 57.3 34.6 60.7
OICR-VGG16 41.2 60.6 37.9 62.1
OICR-Ens. 42.0 61.2 38.2 63.5
OICR-Ens.+FRCNN 47.0 64.3 42.5 65.6

Visualizations

Some OICR visualization results

Some OICR visualization results.

Some visualization comparisons among WSDDN, WSDDN+context, and OICR

Some visualization comparisons among WSDDN, WSDDN+context, and OICR.

License

OICR is released under the MIT License (refer to the LICENSE file for details).

Citing OICR

If you find OICR useful in your research, please consider citing:

@inproceedings{tang2017multiple,
    Author = {Tang, Peng and Wang, Xinggang and Bai, Xiang and Liu, Wenyu},
    Title = {Multiple Instance Detection Network with Online Instance Classifier Refinement},
    Booktitle = {CVPR},
    Year = {2017}
}

Contents

  1. Requirements: software
  2. Requirements: hardware
  3. Basic installation
  4. Installation for training and testing
  5. Extra Downloads (selective search)
  6. Extra Downloads (ImageNet models)
  7. Usage

Requirements: software

  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

Requirements: hardware

  1. NVIDIA GTX TITANX (~12G of memory)

Installation

  1. Clone the OICR repository
# Make sure to clone with --recursive
git clone --recursive https://github.com/ppengtang/oicr.git
  1. Build the Cython modules
cd $OICR_ROOT/lib
make
  1. Build Caffe and pycaffe
cd $OICR_ROOT/caffe-oicr
# Now follow the Caffe installation instructions here:
#   http://caffe.berkeleyvision.org/installation.html

# If you're experienced with Caffe and have all of the requirements installed
# and your Makefile.config in place, then simply do:
make all -j 8
make pycaffe

Installation for training and testing

  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/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. It should have this basic structure
$VOCdevkit/                           # development kit
$VOCdevkit/VOCcode/                   # VOC utility code
$VOCdevkit/VOC2007                    # image sets, annotations, etc.
# ... and several other directories ...
  1. Create symlinks for the PASCAL VOC dataset
cd $OICR_ROOT/data
ln -s $VOCdevkit VOCdevkit2007

Using symlinks is a good idea because you will likely want to share the same PASCAL dataset installation between multiple projects.

  1. [Optional] follow similar steps to get PASCAL VOC 2012.

  2. You should put the generated proposal data under the folder $OICR_ROOT/data/selective_search_data, with the name "voc_2007_trainval.mat", "voc_2007_test.mat", just as the form of fast-rcnn.

  3. The pre-trained models are all available in the Caffe Model Zoo. You should put it under the folder $OICR_ROOT/data/imagenet_models, just as the form of fast-rcnn.

Download pre-computed Selective Search object proposals

Pre-computed selective search boxes can also be downloaded for VOC2007 and VOC2012.

cd $OICR_ROOT
./data/scripts/fetch_selective_search_data.sh

This will populate the $OICR_ROOT/data folder with selective_selective_data. (The script is copied from the fast-rcnn).

Download pre-trained ImageNet models

Pre-trained ImageNet models can be downloaded.

cd $OICR_ROOT
./data/scripts/fetch_imagenet_models.sh

These models are all available in the Caffe Model Zoo, but are provided here for your convenience. (The script is copied from the fast-rcnn).

Usage

Train a OICR_ROOT network. For example, train a VGG16 network on VOC 2007 trainval:

./tools/train_net.py --gpu 1 --solver models/VGG16/solver.prototxt \
  --weights data/imagenet_models/$VGG16_model_name --iters 70000

Test a OICR network. For example, test the VGG 16 network on VOC 2007 test:

On trainval

./tools/test_net.py --gpu 1 --def models/VGG16/test.prototxt \
  --net output/default/voc_2007_trainval/vgg16_oicr_iter_70000.caffemodel \
  --imdb voc_2007_trainval

On test

./tools/test_net.py --gpu 1 --def models/VGG16/test.prototxt \
  --net output/default/voc_2007_trainval/vgg16_oicr_iter_70000.caffemodel \
  --imdb voc_2007_test

Test output is written underneath $OICR_ROOT/output.

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

The codes for training fast rcnn by pseudo ground truths are available on here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].