comp 775: graph cuts and continuous maximal flows

39
Comp 775: Graph Cuts and Continuous Maximal Flows Marc Niethammer, Stephen Pizer Department of Computer Science University of North Carolina, Chapel Hill

Upload: peony

Post on 13-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Comp 775: Graph Cuts and Continuous Maximal Flows. Marc Niethammer, Stephen Pizer Department of Computer Science University of North Carolina, Chapel Hill. Representations. Graph Cuts and Continuous Maximal Flows. Background. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Comp 775: Graph Cuts and Continuous Maximal Flows

Comp 775: Graph Cuts and Continuous Maximal Flows

Marc Niethammer, Stephen PizerDepartment of Computer Science

University of North Carolina, Chapel Hill

Page 2: Comp 775: Graph Cuts and Continuous Maximal Flows

2

Representations

BackgroundGraph Cuts and Continuous Maximal Flows

Classifying individual pixels versus finding an optimal separatingcurve/surface between object and background.

Page 3: Comp 775: Graph Cuts and Continuous Maximal Flows

3

From curve evolution to pixel/voxel labeling

BackgroundGraph Cuts and Continuous Maximal Flows

Example: Chan-Vese model Indicator function

Putting it all together: Relaxed indicator function

Page 4: Comp 775: Graph Cuts and Continuous Maximal Flows

4

Convex vs. Non-Convex

BackgroundGraph Cuts and Continuous Maximal Flows

Non-convex

Initial contour

Initial contour Final contour

Final contour

Images: Bresson et al.

Convex

Convex

Prone to locallyoptimal solutions.

Independent ofinitial condition,optimal solution isguaranteed.

Page 5: Comp 775: Graph Cuts and Continuous Maximal Flows

5

From Curve Evolution to Pixel/Voxel Labeling

BackgroundGraph Cuts and Continuous Maximal Flows

Convex, continuous, constrained optimization problems.

... can also include region-based terms, appearance information, orientation-dependency

Advantages:- Convex -> Globally optimal- No metrication artifacts- Straightforward parallel

implementations

convex

non-convex

Page 6: Comp 775: Graph Cuts and Continuous Maximal Flows

6

Continuous Maximal Flow [Appleton]

Continuous Maximal FlowGraph Cuts and Continuous Maximal Flows

Continuous version of maximal flow [Appleton].Results in a PDE and can be solved as such.

Energy to be minimized:

More general form (can easily include local classifiers):

Page 7: Comp 775: Graph Cuts and Continuous Maximal Flows

7

Segmentation with Continuous Max-Flow

Continuous Maximal FlowGraph Cuts and Continuous Maximal Flows

Images: Unger

Thresholding

Continuous max-flowwith seeds.

Page 8: Comp 775: Graph Cuts and Continuous Maximal Flows

8

Continuous Maximal Flow

Continuous Maximal FlowGraph Cuts and Continuous Maximal Flows

Energy to be minimized:

Introduce the auxiliary variable p, which we maximize for:

Now solve this by gradient descent.

Page 9: Comp 775: Graph Cuts and Continuous Maximal Flows

9

Continuous Maximal Flow

Continuous Maximal FlowGraph Cuts and Continuous Maximal Flows

The variation is

The gradient descent scheme becomes

Page 10: Comp 775: Graph Cuts and Continuous Maximal Flows

10

Chan-Vese (=Otsu-Thresholding w/ spatial regularity)

Continuous Max-FlowGraph Cuts and Continuous Maximal Flows

Iterative solution method is related to solving a wave equation.

Page 11: Comp 775: Graph Cuts and Continuous Maximal Flows

11

Ex.: Segmentation with Continuous Max-Flow

Continuous Max-FlowGraph Cuts and Continuous Maximal Flows

Page 12: Comp 775: Graph Cuts and Continuous Maximal Flows

12

3D Example

Continuous Max-FlowGraph Cuts and Continuous Maximal Flows

Page 13: Comp 775: Graph Cuts and Continuous Maximal Flows

13

Segmentation by Graph-Cut

Graph-CutGraph Cuts and Continuous Maximal Flows

Example: Binary Segmentation

Images from ECCV Tutorial, Kumar/Kohli

Need to partition the picture into foreground and background.

Alternative approach through graph construction (vs. PDE)

Page 14: Comp 775: Graph Cuts and Continuous Maximal Flows

14

Segmentation by Graph-Cut

Graph-CutGraph Cuts and Continuous Maximal Flows

Graph G=(V,E)

Images from ECCV Tutorial, Kumar/Kohli

Approach: Interpret the image as a graph,where pixels are connected to its neighbors.

Goal: Cut the graph into pieces to obtain the desired image partition. Assign a label to every pixel.

Page 15: Comp 775: Graph Cuts and Continuous Maximal Flows

15

Segmentation by Graph-Cut

Graph-CutGraph Cuts and Continuous Maximal Flows

Optimization Problem: Minimize

Looking at it on a pixel-by-pixel basis (where f is the labeling):

Problem: We cannot try all possible pairings for the labels f. Need an efficient algorithm to solve this problem.

Page 16: Comp 775: Graph Cuts and Continuous Maximal Flows

16

Maximum Flow and Minimum Cut

Graph-CutGraph Cuts and Continuous Maximal Flows

Solution: 1) Transform problem to maximizing nework flow 2) Use algorithms for network flows on images.

Preview: Graph structure for binary labeling

Pixels are connected to neighbors (pairwise interaction cost) and to source and target vertices (data cost).

Images: Boykov

Cut separating source (s) from sink (t) gives the segmentation.

Page 17: Comp 775: Graph Cuts and Continuous Maximal Flows

17

Max-Flow/Min-Cut Theorem

Graph-CutGraph Cuts and Continuous Maximal Flows

For any network having a single origin and a single destination node, the maximum possible flow from origin to destination equals the minimum cut value for all the cuts in the network.

Page 18: Comp 775: Graph Cuts and Continuous Maximal Flows

18

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Pixel weights: s to node flow: high if near source (bkg) class, low if notPixel weights: Node to t flow: high if near target class, low if notNode to neighbor flow: high in both directions if near intensities

Page 19: Comp 775: Graph Cuts and Continuous Maximal Flows

19

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

One way to compute maximal flow: 1) Pick any viable path (no zero flow)2) Subtract minimum flow from each segment on path3) Add minimum flow on reverse path

Page 20: Comp 775: Graph Cuts and Continuous Maximal Flows

20

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

1) Pick path (no zero flow)

Page 21: Comp 775: Graph Cuts and Continuous Maximal Flows

21

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

2) Subtract minimum flow from each segment on path3) Add minimum flow on reverse path

Page 22: Comp 775: Graph Cuts and Continuous Maximal Flows

22

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Page 23: Comp 775: Graph Cuts and Continuous Maximal Flows

23

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

1) Pick path (no zero flow)

Page 24: Comp 775: Graph Cuts and Continuous Maximal Flows

24

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

2) Subtract minimum flow from each segment on path3) Add minimum flow on reverse path

Page 25: Comp 775: Graph Cuts and Continuous Maximal Flows

25

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Page 26: Comp 775: Graph Cuts and Continuous Maximal Flows

26

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

1) Pick path (no zero flow)

Page 27: Comp 775: Graph Cuts and Continuous Maximal Flows

27

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

2) Subtract minimum flow from each segment on path3) Add minimum flow on reverse path

Page 28: Comp 775: Graph Cuts and Continuous Maximal Flows

28

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Page 29: Comp 775: Graph Cuts and Continuous Maximal Flows

29

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

1) Pick path (no zero flow)

Page 30: Comp 775: Graph Cuts and Continuous Maximal Flows

30

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

2) Subtract minimum flow from each segment on path3) Add minimum flow on reverse path

Page 31: Comp 775: Graph Cuts and Continuous Maximal Flows

31

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Page 32: Comp 775: Graph Cuts and Continuous Maximal Flows

32

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

- Cut at zeros. - Cost of min-cut is 4. - Divides the nodes (pixels) into

two groups.- Sum of original values of zeros equals the maximum flow.

Page 33: Comp 775: Graph Cuts and Continuous Maximal Flows

33

Example: Ford & Fulkerson

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Look at the difference between initial and final capacities.Ignore negative capacities.This is where everything flows. Flow is conserved at nodes.

Page 34: Comp 775: Graph Cuts and Continuous Maximal Flows

34

Why update the backward flow?

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Image: John Chinneck

Can undo flows. Final flow does not include the central edge.

Page 35: Comp 775: Graph Cuts and Continuous Maximal Flows

35

Image Segmentation

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Allows (amongst many things) to compute binary segmentations.

Image: Boykov

Original Noisy Reconstructed

Page 36: Comp 775: Graph Cuts and Continuous Maximal Flows

36

Multi-Label Case

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Image: Boykov

Page 37: Comp 775: Graph Cuts and Continuous Maximal Flows

37

Multi-Label Case

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Image: Boykov

Page 38: Comp 775: Graph Cuts and Continuous Maximal Flows

38

Influence of Neighborhood Choice

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Minimum cost cut (standard 4-neighborhoods)

Minimum length geodesic contour (image-based Riemannian metric)

Images: Boykov

Can choose different weighted neighborhood to reduce metrication errors. (Or use continuous maximal flow.)

Page 39: Comp 775: Graph Cuts and Continuous Maximal Flows

39

Interactive Segmentations

Segmentation by Graph CutGraph Cuts and Continuous Maximal Flows

Images: Boykov