Welcome to PyMaxflow’s documentation!

PyMaxflow is a Python library to build flow networks and compute their maximum flow/minimum cut (commonly known as graph cuts) as described in [BOYKOV04]. This is a common technique used in different problems of image processing, computer vision and computer graphics. The core of this library is the C++ maxflow implementation by Vladimir Kolmogorov, which can be downloaded from his homepage. Besides being a wrapper to the C++ library, PyMaxflow also offers

  • NumPy integration,

  • methods for fast declaration of complex network layouts with a single API call, which avoids the much slower one-call-per-edge alternative offered by the wrapped functions of the core C++ library, and

  • implementation of algorithms for fast energy minimization with more than two labels: the αβ-swap and the α-expansion.

Take a look at the Tutorial.

License

This software is licensed under the GPL.

Important

The core of the library is the C++ implementation by Vladimir Kolmogorov. It is also licensed under the GPL, but it REQUIRES that you cite [BOYKOV04] in any resulting publication if you use this code for research purposes. This requirement extends to PyMaxflow.

Indices and tables

BOYKOV04(1,2)

An Experimental Comparison of Min-Cut/Max-Flow Algorithms for Energy Minimization in Vision. Yuri Boykov and Vladimir Kolmogorov. In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), September 2004