Oriented Edge Forests for Boundary Detection
Switch branches/tags
Nothing to show
Clone or download
Failed to load latest commit information.
cache first commit Jul 15, 2015
private added missing addpath in genCalibData Jul 16, 2015
README.md first commit Jul 15, 2015
demo.m first commit Jul 15, 2015
detect.m first commit Jul 15, 2015
train.m moved calibration call to end of train.m Jul 16, 2015


Oriented Edge Forests

This repository contains the source code for the method described in

"Oriented Edge Forests for Boundary Detection". Sam Hallman, Charless Fowlkes. CVPR, June 2015

The system is implemented in MATLAB. On a 480-by-320 image, the detector should run in ~2 seconds on an 8-core machine. Development was done on Linux and pre-compiled MEX binaries for Linux are included.


To use this software, you need to have Piotr Dollar's very useful Image & Video Matlab Toolbox installed.

You can download a pre-trained model at http://www.ics.uci.edu/~shallman/oef/modelCvpr.mat. The file is 98 MB, but swells to 1.1 GB when loaded into memory. To train a model yourself, you'll need to download the BSDS500 dataset.


See demo.m for usage examples.

To train a reasonably good detector quickly,

% requires ~5GB of RAM and <4 min/tree
model = train('nPos',5e5, 'nNeg',5e5, 'nTrees',8, ...
  'useParfor',1, 'calibrate',0, 'bsdsDir','/path/to/bsds/');

To train the model from the CVPR paper, just use the default settings:

% requires ~19GB of RAM and ~15 min/tree
model = train('bsdsDir','/path/to/bsds/');

This trains 24 trees by default, because that is originally how I derived the numbers shown in the paper. But 24 trees is probably overkill, and I would bet that you'd get the same results with 12 trees.


Many files were built on top of files from the Sketch Tokens and Structured Forest packages. I also make use of the edge linking files from Peter Kovesi's MATLAB and Octave Functions for Computer Vision and Image Processing page.