Top Banner
Graph Cuts Marc Niethammer
32

Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Jan 03, 2016

Download

Documents

Susanna Wright
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Graph Cuts

Marc Niethammer

Page 2: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Segmentation by Graph-CutsA way to compute solutions to the optimization problems we looked at before.

Example: Binary Segmentation

Images from ECCV Tutorial, Kumar/Kohli

Need to partition the picture into foreground and background.

Page 3: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Segmentation

Graph G=(V,E)

Images from ECCV Tutorial, Kumar/Kohli

But there is much more to graph cuts than binary segmentation (as we will see later)

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 4: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Segmentation

Optimization Problem:

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 5: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Maximum Flow and Minimum Cut

Solution: Borrow algorithms for network flows and use them on images.

Preview: Graph structure for binary labeling

Represent the image such that pixels are connected to neighbors (pairwise interaction cost) as well as to the source and a target vertices (data cost).

Images: Boykov

The cut that separates source (s) from sink (t) gives the segmentation.

Page 6: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Max-Flow/Min-Cut Theorem

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

If we want to find the minimum cut, we can compute the maximum flowand look for the cut(s) that separate origin and destination by cuttingthrough bottlenecks of the network.

Page 7: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

The Ford and Fulkerson algorithm is one of many possibilities to computethe maximal flow.

Page 8: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 9: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 10: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 11: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 12: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 13: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 14: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 15: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 16: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 17: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 18: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 19: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Page 20: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

Cost of min-cut is 4. Divides the nodes (pixels) into two groups.Which equals the maximum flow.

Page 21: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Example: Ford & Fulkerson

This is where everything flows. Flow is conserved at nodes.

Look at the difference between initial and final capacities.Ignore negative capacities.

Page 22: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Why to update backward flow?

Image: John Chinneck

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

Page 23: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Image Denoising

This approach allows us (amongst many things) to compute binary segmentations.Image: Boykov

Original Noisy Reconstructed

Page 24: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Multi-Label Case

Image: Boykov

Page 25: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Multi-Label Case

Image: Boykov

Page 26: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Graph Cut Properties

• Combinatorial optimization for a restricted class of energies• Globally optimal (for certain problem classes)• Discrete formulation with combinatorial optimization

(compare with continuous variational approaches)

Problem: Large memory consumption, in particular in 3D.

Page 27: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Metrication Errors

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.Also, continuous maximal flows exist.

Page 28: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Interactive Segmentations

Images: Boykov

Page 29: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

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

Energy to be minimized:

Play the usual trick of introducing the auxiliary variable p, which we maximize for:

Now solve this by gradient descent.

Page 30: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Continuous Maximum Flow

The variation is

The gradient descent scheme becomes

Page 31: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Segmentation with Continuous Max-Flow

Images: Unger

Thresholding

Continuous max-flowwith seeds.

Page 32: Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.

Bone Segmentation

Also works nicely in 3D.