Walstruzz / edge_eval_python

A python implementation of edge eval
58 stars 18 forks source link

Edge Eval Python

A python implementation of edge eval.

The logic of the code is almost the same as that of the origin MATLAB implementation (see References).

Requirements

Install

1. clone repository

git clone https://github.com/Walstruzz/edge_eval_python.git
cd edge_eval_python

2. compile cxx library

Most of the code in this folder is copied from davidstutz/extended-berkeley-segmentation-benchmark.

Actually, there is a more efficient function in Scipy that can solve the CSA problem without compiling the following cxx codes...

cd cxx/src
source build.sh

Usage

1. save your results

from scipy.io import savemat

key = "result"
result = your_method(image)
savemat(save_name, {key: image})

2.eval

python main.py --alg "HED" --model_name_list "hed" --result_dir examples/hed_result \
--save_dir examples/hed_eval_result --gt_dir examples/bsds500_gt --key result \
--file_format .mat --workers -1

Result(BSDS 500)

3063 5096

F-Score

ODS OIS AP R50
0.789 0.806 0.810 0.897

Note

References