pmneila / PyMaxflow

Python library for creating flow networks and computing the maxflow/mincut (aka graph-cuts for Python)

Home Page:http://pmneila.github.io/PyMaxflow/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyMaxflow

PyMaxflow is a Python library for graph construction and maxflow computation (commonly known as graph cuts).

doc/source/_static/small_layout_07.png

The core of this library is the C++ implementation by Vladimir Kolmogorov, which can be downloaded from his homepage. Besides the wrapper to the C++ library, PyMaxflow offers

  • NumPy integration,
  • methods for fast construction of common graph layouts in computer vision and graphics,
  • implementation of algorithms for fast energy minimization which use the maxflow method: the αβ-swap and the α-expansion.

Take a look at the PyMaxflow documentation.

Example layouts

PyMaxflow offers methods to easily build advanced network layouts with a few API calls. These are examples from layout_examples.py.

doc/source/_static/montage.png

Installation

Open a terminal and write:

$ pip install PyMaxflow

Manual installation

Download the source code or clone the Github repository. Open a terminal and write:

$ cd path/to/PyMaxflow
$ python setup.py build
... lots of text ...

If everything went fine, you should be able to install the package with:

$ python setup.py install

About

Python library for creating flow networks and computing the maxflow/mincut (aka graph-cuts for Python)

http://pmneila.github.io/PyMaxflow/


Languages

Language:C++ 54.3%Language:Cython 31.2%Language:Python 14.1%Language:C 0.4%