This document shows the whole pipeline for post-processing model output: performing Non-Maximum Suppression (NMS), and benchmarking using BSDS500 dataset.
The model output on test dataset is saved in RCF-pytorch/tmp/RCF
.
For both RCF and HED, the model output only shows a probablity map of edge pixels, so an NMS is neccessary for evaluation on dataset benchmark.
Both of the authors of HED and RCF provides some code for doing NMS. The code depends on Pictor's Edge Detection Toolbox, and Buenaposada's Matlab Toolbox. Then all those toolboxes should also be installed (or not, see notes below).
Notes:
- Important: Piotr's Matlab Toolbox is deprecated due to a int type problem mentioned here.
- For win64/linux64 systems, the binaries are already included, so there is no need to install/compile the libraries using mex.
- The libraries for NMS in the toolbox is private, so a wrapper for
edgesNmsMex
should be written inedges/
.
Modify the paths in the /rcf/examples/rcf/edges_nms.m
file, and simply run the MATLAB script. The output edges will be saved in the path you choose.