Presentation is loading. Please wait.

Presentation is loading. Please wait.

MRF Labeling With Graph Cut CMPUT 615 Nilanjan Ray.

Similar presentations


Presentation on theme: "MRF Labeling With Graph Cut CMPUT 615 Nilanjan Ray."— Presentation transcript:

1 MRF Labeling With Graph Cut CMPUT 615 Nilanjan Ray

2 The MRF Labeling Problem A cost function of the following form provides an MRF model: The variables p i are binary, i.e., takes values 0 or 1 only f i are image specific terms called “likelihood” data term g (i,j) typically enforce “spatial coherence” or “smoothness” in the solution We want to minimize E to obtain a binary labeling (p 1,…, p N ) for an image

3 An Example Likelihood An Image Probability densities for foreground and background image intensity: The “likelihood” data term:

4 Spatial Smoothness One can efficiently obtain a global minimization of E provided: An example smoothness term (Ising model): Source-sink graph cut (a.k.a. S-T graph cut) provides is an efficient algorithm solving the binary labeling problem

5 S-T Graph Cut A source-sink graph: every pixel must be connected to at least s or t A cut of source-sink graph: dashed edges are removed Source set of pixels in the cut: Sink set of pixels in the cut: A cut is the set of removed edges between the source and the sink sets; in S-T cut graph a pixel must belong either to s or to t, but not both.

6 S-T Cut and MRF Labeling The idea is to construct a S-T graph so that a cut of the graph can represent the cost function E. Next get the minimum cut of the S-T graph to minimize E. Every edge in the S-T graph should carry a cost The likelihood data term and the spatial smoothness term must be represented by the sum of the cost of the removed edges

7 Representing The Likelihood Term Consider the following algebraic manipulation: The basis of the identity: Construct a S-T graph as: N+2 vertices; N vertices represent N pixels, one vertex for s and another vertex for t Add an edge from s to i with weight f i (1)- f i (0) if f i (1)- f i (0)>0; else add an edge from i to t with weight f i (0)- f i (1) if f i (0)- f i (1)>0. Can you see why such a construction represents likelihood data terms?

8 Representing Smoothness Algebraic manipulations to the smoothness summation term: Need to represent the first three summation terms in the graph edges

9 Representing Smoothness… For the first summation: add an edge between every neighboring pixel pair (i, j) with weight For the second summation, if add an edge from s to i with weight else if add an edge from i to t with weight The third summation: similar to the second summation case What if an edge already exits? Just update the its weight.

10 Example Segmentation A cell image Segmentation by graph cut

11 Summary S-T graph cut can solve a restricted Binary MRF labeling problem; The restriction is due to the allowed smoothness terms. This is the state-of-the-art computation for Binary MRF labeling More than binary labeling is an NP-hard problem: some heuristics exists for graph-cut Also there are heuristics to relax the restrictions on the smoothness function


Download ppt "MRF Labeling With Graph Cut CMPUT 615 Nilanjan Ray."

Similar presentations


Ads by Google