So I'm still playing around with constrained parametric min-cuts for object segmentation. A major bottleneck of this algorithm is gPb, the global probability of boundary operator from Malik's group. Luckily, there already is a CUDA implementation of gPb out there: Damascene . Damascene provides a command line interface to apply gPb to ppm images. Since I wanted to include it directly with cpmc, I wrote some mex-wrappers for Damascene. And since I would love to see more algorithms done in Python instead of Matlab, I wrote some Python wrappers, too. You can find both, together with the current version of damascene here . You need a working CUDA setup and the acm library to compile it. Set your paths in common.mk and just "make" it. For the matlab wrappers, you also need to adjust the matlab path in "bindings/Makefile" and "make gpb_mex" in that directory. For the python wrappers, you have to compile damascene with "make shared=1"