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". Then you can simply call gpu_gpb.py inside the bindings directory.
If you only have the students' version of Matlab, like me, you can use the file "common_32.mk" instead of common.mk to cross-compile damascene. You will probably have to adjust some paths in there, too.
I'd like to thank Bryan Catanzaro for making Damascene public. It's really a great tool!