SPP_net : Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
Matlab C++
Failed to load latest commit information.
License birth Sep 24, 2014
bbox_regression spp Sep 25, 2014
data change file paths on onedrive Jul 11, 2016
datasets/VOCdevkit2007/VOCcode birth Sep 24, 2014
experiments update parse_copy_finetune_prototxt for new caffe Oct 17, 2014
external change file paths on onedrive Jul 11, 2016
finetuning birth Sep 24, 2014
imdb birth Sep 24, 2014
model-defs prototxt for new caffe Oct 9, 2014
nms update for linux Dec 8, 2014
selective_search add spp demo Nov 5, 2014
utils add extra checks to mex file Oct 15, 2014
vis spp Sep 25, 2014
.gitattributes 💥🐫 Added .gitattributes Sep 24, 2014
.gitignore birth Sep 24, 2014
README.md change file paths on onedrive Jul 11, 2016
spp_build.m add spp demo Nov 5, 2014
spp_cache_convX_features.m spp Oct 9, 2014
spp_config.m make unix compatible; fix for matlab without parallel toolbox Oct 14, 2014
spp_create_model.m spp Sep 25, 2014
spp_demo.m Update spp_demo.m Jun 4, 2015
spp_detect.m add spp demo Nov 5, 2014
spp_feature_stats.m birth Sep 24, 2014
spp_features_convX.m birth Sep 24, 2014
spp_features_convX_to_poolX.m birth Sep 24, 2014
spp_layers_in_gpu.m birth Sep 24, 2014
spp_load_cached_poolX_features.m birth Sep 24, 2014
spp_load_model.m birth Sep 24, 2014
spp_load_pooling_params.m birth Sep 24, 2014
spp_locate_trans_fc.m birth Sep 24, 2014
spp_poolX_to_fcX.m birth Sep 24, 2014
spp_scale_features.m birth Sep 24, 2014
spp_test.m birth Sep 24, 2014
spp_train.m birth Sep 24, 2014
startup.m update for linux Dec 8, 2014


SPP_net: spatial pyramid pooling in deep convolutional networks for visual recognition

Acknowledgements: a huge thanks to Yangqing Jia for creating Caffe and the BVLC team, and to Ross Girshick for creating RCNN


This is a re-implementation of the object detection algorithm described in the ECCV 2014 paper "Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition". This re-implementation should reproduce the object detection results reported in the paper up to some statistical variance. The models used in the paper are trained/fine-tuned using cuda-convnet, while the model attached with this code is trained/fine-tuned using Caffe, for the ease of code release.

The implementation of image classification training/testing has not been included, but the network configuration files can be found directly in this code.

Please contact sqren@mail.ustc.edu.cn or kahe@microsoft.com if you have any question.

Citing SPP_net

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

    Author = {Kaiming, He and Xiangyu, Zhang and Shaoqing, Ren and Jian Sun},
    Title = {Spatial pyramid pooling in deep convolutional networks for visual recognition},
    Booktitle = {European Conference on Computer Vision},
    Year = {2014}


SPP_net is released under the Simplified BSD License for non-commercial use (refer to the LICENSE file for details).

Installing SPP_net

  1. Prerequisites
    1. MATLAB (tested with 2014a on 64-bit Windows)
    2. Caffe's prerequisites (some function is based our modified caffe, so we provied compiled caffe mex and cpp file for mex wapper), run external\fetch_caffe_mex_5_5.m to download
    3. News: a caffe version which supports spp mex is provided in https://github.com/ShaoqingRen/caffe/tree/SPP_net, this version is forked from BVLC/caffe on Oct. 1, 2014. For the caffe.mex compiled from this caffe code, the Zeiler CNN network with compatible structure (shared in OneDrive ), and new prototxts for finetune (in ./model-defs) should be used.
  2. Install SPP_net
    1. Get the SPP_net source code by cloning the repository: git clone https://github.com/ShaoqingRen/SPP_net.git
    2. Now change into the SPP_net source code directory
    3. SPP_net expects to find Caffe in external/caffe
    4. Start MATLAB (make sure you're still in the spp directory): matlab
    5. You'll be prompted to download the Selective Search code, which we cannot redistribute. Afterwards, you should see the message SPP_net startup done followed by the MATLAB prompt >>.
    6. Run the build script: >> spp_build() (builds liblinear, Selective Search, spp_pool and nms). Don't worry if you see compiler warnings while building liblinear, this is normal on my system.
    7. Download the model package by run external\fetch_model_data.m

Training your own SPP_net detector on PASCAL VOC

Let's use PASCAL VOC 2007 as an example. The basic pipeline is:

extract features to disk -> finetune -> train SVMs -> test

You'll need about 20GB of disk space free for the feature cache (which is stored in feat_cache by default. It's best if the feature cache is on a fast, local disk.

An one click script is experiments\Script_spp_voc.m