Skip to content

zhangliliang/RPN_BF

 
 

Repository files navigation

Is Faster R-CNN Doing Well for Pedestrian Detection?

By Liliang Zhang, Liang Lin, Xiaodan Liang, Kaiming He

Introduction

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.

Citing RPN+BF

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}
}

Requirements

  1. 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.
  2. MATLAB

  3. 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.

Testing Demo

  1. Download VGG16_caltech_final.zip from BaiduYun,or Onedrive and unzip it in the repo folder.

  2. Start MATLAB from the repo folder.

  3. Run faster_rcnn_build

  4. Run script_rpn_bf_pedestrian_VGG16_caltech_demo to see the detection results on some images collected in Internet.

Training on Caltech (RPN)

  1. Download "Matlab evaluation/labeling code (3.2.1)" as external/code3.2.1 by run fetch_data/fetch_caltech_toolbox.m

  2. Download the annotations and videos in Caltech Pedestrian Dataset and put them in the proper folder follow the instruction in the website.

  3. 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 for vgg16.caffemodel should be e54292186923567dc14f21dee292ae36.

  4. 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.

  5. Run script_rpn_pedestrian_VGG16_caltech to train and test the RPN model on Caltech. Wait about half day for training and testing.

  6. Hopefully it would give the evaluation results around ~14% MR after running.

Training on Caltech (RPN+BF)

  1. Follow the instruction in "Training on Caltech (RPN)" for obtaining the RPN model.

  2. 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.

  3. Hopefully it would give the evaluation results around ~10% MR after running.

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 90.2%
  • C++ 5.2%
  • Cuda 3.8%
  • Other 0.8%