GithubHelp home page GithubHelp logo

wenyang001 / edge_eval_python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from walstruzz/edge_eval_python

0.0 0.0 0.0 4.64 MB

A python implementation of edge eval

Shell 0.09% C++ 60.92% Python 31.68% C 7.31%

edge_eval_python's Introduction

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

  • Python3
  • Numpy
  • Scipy >= 1.6.0
  • g++
  • Matplotlib

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

  • Because of the difference in calculation precision and the sensitivity of NMS threshold, the edge images may be slightly different.
  • match_edge_maps samples points randomly (so as Matlab).
  • Python and Matlab index files in different order, resulting in different order of eval_bdry_img.txt.
  • Python version is slower than Matlab version. Should I implement more functions in cxx/lib/solve_cas.so?

References

edge_eval_python's People

Contributors

arka161 avatar walstruzz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.