Skip to content

Latest commit

 

History

History
 
 

HED

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Holistically-Nested Edge Detection

Reproduce the HED paper by Saining. See https://arxiv.org/abs/1504.06375.

HED

(Bottom-left: raw fused heatmap; Middle and right column: raw heatmaps at different stages)

HED is a fully-convolutional architecture. This code generally would also work for other FCN tasks such as semantic segmentation and detection.

Usage

This script needs the original BSDS dataset and applies augmentation on the fly. It will automatically download the dataset to $TENSORPACK_DATASET/ if not there.

It requires pretrained vgg16 model. See the docs in examples/CaffeModels for instructions to convert from vgg16 caffe model.

To view augmented training images:

./hed.py --view

To start training:

./hed.py --load vgg16.npz

It takes about 100k steps (~10 hours on a TitanX) to reach a reasonable performance.

To inference (produce a heatmap at each level at out*.png):

./hed.py --load pretrained.model --run a.jpg

Models I trained can be downloaded here.