Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.


DeepPyramid is a simple toolkit for building feature pyramids from deep convolutional networks. The DeepPyramid data structure is nearly identical to the HOG feature pyramid created by the featpyramid.m function in the voc-dpm code.


This code was used in our tech report about the relationship between deformable part models and convolutional networks.

    author    = {Ross Girshick and Forrest Iandola and Trevor Darrell and Jitendra Malik},
    title     = {Deformable Part Models are Convolutional Neural Networks},
    journal   = {CoRR},
    year      = {2014},
    volume    = {abs/1409.5403},
    url       = {},
    year      = {2014}


  1. Prerequisites
  2. MATLAB (tested with 2014a on 64-bit Linux)
  3. Caffe's prerequisites
  4. Install Caffe (this is the most complicated part)
  5. Follow the Caffe installation instructions
  6. Let's call the place where you installed caffe $CAFFE_ROOT (you can run export CAFFE_ROOT=$(pwd))
  7. Important: Make sure to compile the Caffe MATLAB wrapper, which is not built by default: make matcaffe
  8. Important: Make sure to run cd $CAFFE_ROOT/data/ilsvrc12 && ./ to download the ImageNet image mean
  9. DeepPyramid has been tested with master and dev at the time of this writing
  10. Get DeepPyramid
  11. git clone
  12. If you haven't installed R-CNN, you'll need to download its models
  13. Copy R-CNN's non-finetuned ImageNet network <rcnnpath>/data/caffe_nets/ilsvrc_2012_train_iter_310k to <deeppyramidpath>/data/caffe_nets/ilsvrc_2012_train_iter_310k (or just create a symlink).


  1. Run matlab from inside the DeepPyramid code directory
  2. Add the matcaffe mex function to your path (addpath /path/to/caffe/matlab/caffe)
  3. Run the demo demo_deep_pyramid


DeepPyramid can be used for implementing DPMs on deep convolutional network features, rather than HOG features. It can also be used whenever you need a dense multiscale pyramid of image features.


The implementation is designed to be simple and as a result is very inefficient. There are a variety of ways to speed it up, and they will be done in the future. For now, it takes about 0.5 to 0.6 seconds to compute a feature pyramid on an NVIDIA Titan GPU, which is acceptable.


Deep feature pyramids for various computer vision algorithms (DPMs, pyramid R-CNN, etc.)




No releases published


No packages published


You can’t perform that action at this time.