Giter Site home page Giter Site logo

abrams90 / soft-nms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bharatsingh430/soft-nms

0.0 2.0 0.0 8.52 MB

Object Detection

CMake 1.16% Makefile 0.28% HTML 0.08% CSS 0.10% Jupyter Notebook 55.77% C++ 32.06% Shell 0.40% Python 6.41% Cuda 2.62% MATLAB 0.37% M 0.01% Protocol Buffer 0.65% C 0.11%

soft-nms's Introduction

Soft-NMS

This repository includes the code for Soft-NMS. Soft-NMS is integrated with two object detectors, R-FCN and Faster-RCNN. The Soft-NMS paper can be found here.

Soft-NMS+D-RFCN repository gets 40.9% mAP on COCO.

To test the models with soft-NMS, clone the project and test your models as in standard object detection pipelines. This repository supports Faster-RCNN and R-FCN where an additional flag can be used for soft-NMS.

The flags are as follows,

  1. Standard NMS. Use flag TEST.SOFT_NMS 0
  2. Soft-NMS with linear weighting. Use flag TEST.SOFT_NMS 1 (this is the default option)
  3. Soft-NMS with Gaussian weighting. Use flag TEST.SOFT_NMS 2

In addition, you can specify the sigma parameter for Gaussian weighting and the threshold parameter for linear weighting. Detections below 0.001 are discarded. For integrating soft-NMS in your code, refer to cpu_soft_nms function in lib/nms/cpu_nms.pyx and soft_nms wrapper function in lib/fast_rcnn/nms_wrapper.py. You can also implement your own weighting function in this file.

For testing a model on COCO or PASCAL, use the following script

./tools/test_net.py --gpu ${GPU_ID} \
  --def models/${PT_DIR}/${NET}/rfcn_end2end/test_agnostic.prototxt \
  --net ${NET_FINAL} \
  --imdb ${TEST_IMDB} \
  --cfg experiments/cfgs/rfcn_end2end_ohem_${PT_DIR}.yml \
  --set TEST.SOFT_NMS 1 # performs soft-NMS with linear weighting
  ${EXTRA_ARGS}

GPU_ID is the GPU you want to test on

NET_FINAL is the caffe-model to use

PT_DIR in {pascal_voc, coco} is the dataset directory

DATASET in {pascal_voc, coco} is the dataset to use

TEST_IMDB in {voc_0712_test,coco_2014_minival,coco_2014_test} is the test imdb

TEST.SOFT_NMS in {0,1,2} is flag for different NMS algorithms. 0 is standard NMS, 1 performs soft-NMS with linear weighting and 2 performs soft-NMS with gaussian weighting

Please refer to py-R-FCN-multiGPU for details about setting up object detection pipelines. The Soft-NMS repository also contains code for training these detectors on multiple GPUs. The position sensitive ROI Pooling layer is updated so that interpolation of bins is correct, like ROIAlign in Mask RCNN. The COCO detection model for R-FCN can be found here. All other detection models used in the paper are publicly available.

Results on MS-COCO

training data test data mAP@[0.5:0.95]
R-FCN, NMS COCO 2014 train+val -minival COCO 2015 minival 33.9%
R-FCN, Soft-NMS L COCO 2014 train+val -minival COCO 2015 minival 34.8%
R-FCN, Soft-NMS G COCO 2014 train+val -minival COCO 2015 minival 35.1%
F-RCNN, NMS COCO 2014 train+val -minival COCO 2015 test-dev 24.4%
F-RCNN, Soft-NMS L COCO 2014 train+val -minival COCO 2015 test-dev 25.5%
F-RCNN, Soft-NMS G COCO 2014 train+val -minival COCO 2015 test-dev 25.5%

R-FCN uses ResNet-101 as the backbone CNN architecture, while Faster-RCNN is based on VGG16.

Citing Soft-NMS

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

@article{1704.04503,
  Author = {Navaneeth Bodla and Bharat Singh and Rama Chellappa and Larry S. Davis},
  Title = {Improving Object Detection With One Line of Code},
  Journal = {arXiv preprint arXiv:1704.04503},
  Year = {2017}
}

soft-nms's People

Contributors

bharatsingh430 avatar navaneethbodla avatar

Watchers

James Cloos avatar Abrams Xu 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.