Skip to content

teeso/pytorch_hed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytorch_hed

Disclaimer

Steps to take

  1. clone this repo
git clone https://github.com/zchrissirhcz/pytorch_hed
  1. Get vgg16.pth
wget https://download.pytorch.org/models/vgg16-397923af.pth
  1. Get BSDS data
wget http://vcl.ucsd.edu/hed/HED-BSDS.tar
tar -xvf HED-BSDS.tar

You may need to change HED-BSDS folder's path in config.py. utils/dataset.py's BSDS500 and BSDS500_TEST class provide default HED-BSDS path but may be not consistent with yours.

  1. Begin training

Without log file:

python train.py

With log file:

tmux new -s pytorch_hed_train
./scripts/train.sh

Ctrl-B + D  # Detatch

# Then in any terminal
tailf log.txt

I've trained with default parameters on a 1080Ti GPU with Ubuntu16.04, PyTorch 0.4. See https://github.com/zchrissirhcz/pytorch_hed/blob/master/log/train_log.2018.07.09 for my training result.

  1. Tesing
python test.py
  1. Evaluation

This step is based on the result of previous step. In eval folder there are some MATLAB and Cpp files ported from related open-source projects.

cd eval
bash build.sh

Then open MATLAB and run edge_nms.m. (You may need to change paths in this script)

Then prepare BSR and toolbox, put them or create soft link in external folder.

Then in MATLAB run bench_bsds500.m. (You may again need to change paths in this script, and this script takes several hours for BSDS500 edge detection evalution).

TodoList

  1. Train the model with default hyper-parameters

  2. Add evaluation on BSDS500 benchmark

  3. Manifest if this implementation is in consistent with official HED paper

  4. Implement Richer Convolution Features for Edge Detection (RCF, CVPR2017)

  5. WeBox

Misc

I have got ODS=0.771 on BSDS500 dataset with Adam.

Change Log

2018/7/9 first commit, forks and configured HED's used BSDS500 dataset

2018/7/10 add training log file with default hyper-parameter settings

2018/7/11 add evalution code and related generated files

About

HED edge detector with PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published