DeepBox
Created by Weicheng Kuo at UC Berkeley
Fast DeepBox is a bounding box proposal re-ranker using ConvNets. It produces state-of-the-art bounding box proposal within 0.5s using a light-weight 4-layer network. Experiments on both PASCAL and COCO showed that DeepBox performs significantly better than Edge boxes in terms of Area under Curve and that the gain carries over to detection mAP. This implementation is based on Ross's Fast-RCNN codebase, thereby written in Python and C++/Caffe.
DeepBox was initially described in an arXiv paper and later published at ICCV 2015.
Fast DeepBox is released under the MIT License (refer to the LICENSE file for details).
If you find Fast DeepBox useful in your research, please consider citing:
@inproceedings{KuoICCV15DeepBox, Author = {Weicheng Kuo, Bharath Hariharan, Jitendra Malik}, Title = {DeepBox:Learning Objectness with Convolutional Networks}, Booktitle = {International Conference on Computer Vision ({ICCV})}, Year = {2015} }
Requirements for Caffe
and pycaffe
(see: Caffe installation instructions)
Note: Caffe doesn't have to be built with support for Python layers!
You can download my Makefile.config for reference.
Python packages you might not have: cython
, python-opencv
, easydict
MATLAB (required for running COCO evaluation)
A good GPU (e.g., Titan, K20, K40, ...) with at least 3G of memory suffices
Clone the Fast DeepBox repository
git clone https://github.com/weichengkuo/DeepBox.git
We'll call the directory that you cloned Fast DeepBox into FDBOX_ROOT
Build the Cython modules
cd $FDBOX_ROOT/src make
Build Caffe and pycaffe
cd $FDBOX_ROOT/caffe-fast-rcnn# 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 -j8 && make pycaffe
Download pre-computed Fast DeepBox models
cd $FDBOX_ROOT/output/default ./scripts/fetch_fast_dbox_models.sh
This will populate the $FDBOX_ROOT/output/default
folder with coco_train2014
,which contains a variety of models. These include multiscale/single-scale Fast DeepBox models and a multiscale sliding window model for training comparison.
After successfully completing basic installation, you'll be ready to run the demo.
Python
To run the demo
cd $FDBOX_ROOTpython ./tools/demo.py
By default, visualization only shows top five proposals per image and their scores. Users can set the number of proposals they want to visualize by passing in --numboxes [Number of proposals] argument. There is another demo mode on full COCO dataset that user can choose by passing in --demo 0 argument. This allows users to visualize Fast DeepBox proposals on any frame of users' choice in COCO validation set, but requires users to download pre-computed Edge boxes proposals and install COCO dataset in full.
Here are the steps to set up full functionalities of DeeBox package.
Download pre-computed Edge boxes proposals
cd $FDBOX_ROOT/data ./scripts/fetch_edge_box_data.sh
The Edge boxes proposals are pre-computed in order to reduce installation requirements. This step is necessary for demo.
Download COCO Matlab data
cd $FDBOX_ROOT/data ./scripts/fetch_coco_matlab_data.sh
This step downloads the Matlab COCO image ordering with which Edge boxes proposals are computed. Ground truth boxes would also be downloaded to enable evaluation.
Set up Microsoft COCO directory by
cd $FDBOX_ROOT/data ln -s PATH/TO/YOUR/COCO ./MSCOCO
If you haven't installed COCO on your machine yet, you can follow the instructions on the following github page to download and compile all the data. -MSCOCO
Download pre-trained ImageNet models
Pretrained ImageNet model for Alex net can be downloaded to initialize the DeepBox network training.
cd $FDBOX_ROOT./data/scripts/fetch_imagenet_models.sh
Alternatively, users can initialize the training with our multiscale sliding window model in
$FDBOX_ROOT/output/default/coco_train2014/fast-dbox-slidwindow-multiscale.caffemodel
Train a Fast DeepBox proposer:
python ./tools/train_net.py (Show all training options)python ./tools/train_net.py --gpu 0 (Train on GPU 0)
Train output is written underneath $FDBOX_ROOT/output/default/coco_train2014
.
Test a Fast DeepBox proposer:
python ./tools/test_net.py (Show all testing options)python ./tools/test_net.py --gpu 0 (Test on GPU 0)python ./tools/test_net.py --imdb coco_test-dev2015 (Test on Test-dev split)
Test output is written underneath $FDBOX_ROOT/output/default/coco_val2014
by default. If you test on test-dev, it will be underneath coco_test-dev2015 instead.
Full Demo a pre-trained Fast DeepBox proposer on COCO val set
python ./tools/demo.py (Show all demo options)python ./tools/demo.py --demo 0 --frame 0 --numboxes 5 (Demo on frame 0 of COCO val set showing top 5 proposals)
Evaluate the test result. This part is written in Matlab. First launch your Matlab in $FDBOX_ROOT. Then do the following:
cd ./eval eval_fast_dbox plot_fast_dbox(name)
The evaluation output will be printed and the Recall-vs-NumOfProposals plots will be shown.
Pre-computed Fast DeepBox proposals on COCO train, val, and test-dev. Shell cd $FDBOX_ROOT/data ./scripts/fetch_fast_dbox_models.sh
上一篇:CNN-LSTM-CTC
下一篇:VRNN
还没有评论,说两句吧!
热门资源
Keras-ResNeXt
Keras ResNeXt Implementation of ResNeXt models...
seetafaceJNI
项目介绍 基于中科院seetaface2进行封装的JAVA...
spark-corenlp
This package wraps Stanford CoreNLP annotators ...
capsnet-with-caps...
CapsNet with capsule-wise convolution Project ...
inferno-boilerplate
This is a very basic boilerplate example for pe...
智能在线
400-630-6780
聆听.建议反馈
E-mail: support@tusaishared.com