By Liliang Zhang, Liang Lin, Xiaodan Liang, Kaiming He
This code is relative to an arXiv tech report, which is accepted on ECCV 2016.
The RPN code in this repo is written based on the MATLAB implementation of Faster R-CNN. Details about Faster R-CNN are in: ShaoqingRen/faster_rcnn.
This BF code in this repo is written based on Piotr's Image & Video Matlab Toolbox. Details about Piotr's Toolbox are in: pdollar/toolbox.
This code has been tested on Ubuntu 14.04 with MATLAB 2014b and CUDA 7.5.
If you find this repo useful in your research, please consider citing:
@article{zhang2016faster,
title={Is Faster R-CNN Doing Well for Pedestrian Detection?},
author={Zhang, Liliang and Lin, Liang and Liang, Xiaodan and He, Kaiming},
journal={arXiv preprint arXiv:1607.07032},
year={2016}
}
-
Caffe
build for RPN+BF (see here)- If the mex in 'external/caffe/matlab/caffe_faster_rcnn' could not run under your system, please follow the instructions on our Caffe branch to compile and replace the mex.
-
MATLAB
-
GPU: Titan X, K40c, etc.
WARNING: The caffe_.mexa64
in external/caffe/matlab/caffe_faster_rcnn
might be not compatible with your computer. If so, please try to compile this Caffe version and replace it.
-
Download
VGG16_caltech_final.zip
from BaiduYun,or Onedrive and unzip it in the repo folder. -
Start MATLAB from the repo folder.
-
Run
faster_rcnn_build
-
Run
script_rpn_bf_pedestrian_VGG16_caltech_demo
to see the detection results on some images collected in Internet.
-
Download "Matlab evaluation/labeling code (3.2.1)" as
external/code3.2.1
by runfetch_data/fetch_caltech_toolbox.m
-
Download the annotations and videos in Caltech Pedestrian Dataset and put them in the proper folder follow the instruction in the website.
-
Download the VGG-16 pretrain model and the relative prototxt in
VGG16_caltech_pretrain.zip
from BaiduYun or OneDrive, and unzip it in the repo folder. The md5sum forvgg16.caffemodel
should bee54292186923567dc14f21dee292ae36
. -
Start MATLAB from the repo folder, and run
extract_img_anno
for extracting images in JPEG format and annotations in TEXT format from the Caltech dataset. -
Run
script_rpn_pedestrian_VGG16_caltech
to train and test the RPN model on Caltech. Wait about half day for training and testing. -
Hopefully it would give the evaluation results around ~14% MR after running.
-
Follow the instruction in "Training on Caltech (RPN)" for obtaining the RPN model.
-
Run
script_rpn_bf_pedestrian_VGG16_caltech
to train and test the BF model on Caltech. Wait about two or three days for training and testing. -
Hopefully it would give the evaluation results around ~10% MR after running.