Skip to content

ginobilinie/py-faster-rcnn

Repository files navigation

Fast R-CNN

Requirements

  1. Requirements for Caffe and pycaffe
  2. Additional Python packages: cython, python-opencv, easydict
  3. Matlab (required for PASCAL VOC evaluation only)

Installation

  1. Extract the source code: $ tar zxvf fast-rcnn.tgz; call the source directory $FRCNN
  2. Build Cython modules: $ cd $FRCNN/src && make (there will probably be some benign warnings that you can ignore)
  3. Build Caffe and pycaffe: $ cd $FRCNN/caffe-fast-rcnn and follow the Caffe installation instructions
  4. Establish symlinks for VOCdevkits
  5. Symlink $FRCNN/data/VOCdevkit2007 to where you have the PASCAL VOC 2007 devkit and data installed
  6. And similiarly for other PASCAL VOC 20XY datasets
  7. Symlink $FRCNN/data/cache to somewhere that will store cached dataset files

Usage

Train a Fast R-CNN detector. For example, train a VGG 16 network on VOC 2007 trainval:

./tools/train_net.py --gpu 0 --solver models/VGG_16/solver.prototxt --weights /data/reference_caffe_nets/VGG_ILSVRC_16_layers.v2.caffemodel

Test a Fast R-CNN detector. For example, test the VGG 16 network on VOC 2007 test:

./tools/test_net.py --gpu 1 --def models/VGG_16/test.prototxt --net snapshots/vgg16_fast_rcnn_iter_40000.caffemodel

Test output is written underneath $FRCNN/output.

Compress a Fast R-CNN model using SVD on the fully-connected layers:

./tools/compress_model.py --def models/VGG_16/test.prototxt --def-svd models/VGG_16/compressed/test.prototxt --net snapshots/vgg16_fast_rcnn_iter_40000.caffemodel

About

Faster R-CNN (Python implementation) -- see https://github.com/ShaoqingRen/faster_rcnn for the official MATLAB version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.4%
  • C 4.3%
  • Shell 3.2%
  • Cuda 2.2%
  • MATLAB 0.8%
  • C++ 0.1%