CUDA implemented PUSH RELABEL solves general graph?

565 views Asked by At

I've been trying to find some opensource code, that does Goldberg's push and relabel, or preflow-push , preflow-relabel to solve graph cuts for a GENERAL graph.

I know CUDA has the npp GrabCut 2D sample code, and I also know that nppiGraphCut() solves graphcut for the 2D plane when every pixel is treated as a node. HOWEVER, I want something that solves given the following graph inputs:

source, sink, number of nodes, from nodes, to nodes, forward arc weights (from -> to nodes) backward arc weights (to -> from nodes) source weights (source to non-terminal nodes capacities) sink weights (non-terminal nodes to sink capacities)

I have this in matlab such that the following graph is given like this, where source connects to nodes <1><2><3> with sourceWeights, and nodes <1><2><3> connect to sink node with sinkWeights. And likewise, there are nodes between capacities, but only connected in one direction (i.e. the reverse capacity is 0).

                <source>

<1> -> <2> -> <3> -> <4> -> <5> -> <6> ...

                 <sink>

Can this be used in nppGraphCut as a 1D array (<1><2><3>) to perform graph cut on?

0

There are 0 answers