pesser / StructuredForests

A Python Implementation for Piotr's ICCV Paper "Structured Forests for Fast Edge Detection".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StructuredForests for Fast Edge Detection

Installation

This is a modification of Artanis' Python Implementation for Piotr's ICCV Paper "Structured Forests for Fast Edge Detection". It works with Python 3 and can be installed with

pip install git+https://github.com/pesser/StructuredForests.git

Command line usage

You can then detect edges on an image using the edgedetect.py command:

> edgedetect.py -h
usage: edgedetect.py [-h] input output

positional arguments:
  input       Path to input image or directory.
  output      Path to output image or directory.

optional arguments:
  -h, --help  show this help message and exit

Library usage

To use it in your Python code do:

from sedges import SEdges

model = SEdges()
edges = model.predict(img)

img should be a float RGB image with shape (h, w, 3) and values in [0, 1]. The returned edges has shape (h, w) and values in [0, 1] indicating the presence of edges.

Thanks

About

A Python Implementation for Piotr's ICCV Paper "Structured Forests for Fast Edge Detection".

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 94.6%Language:C++ 5.1%Language:C 0.4%