Overview of graph cuts

28
2010/5/17 2010/5/17 1 Overview of graph cuts Overview of graph cuts

description

Overview of graph cuts. Outline. Introduction S-t Graph cuts Extension to multi-label problems Compare simulated annealing and alpha-expansion algorithm. Introduction. Discrete energy minimization methods that can be applied to Markov Random Fields (MRF) with binary labels or multi-labels. - PowerPoint PPT Presentation

Transcript of Overview of graph cuts

Page 1: Overview of graph cuts

2010/5/172010/5/17 11

Overview of graph cutsOverview of graph cuts

Page 2: Overview of graph cuts

2010/5/172010/5/17 22

OutlineOutlineIntroductionIntroduction

S-t Graph cuts S-t Graph cuts

Extension to multi-label problemsExtension to multi-label problems

Compare simulated annealing and alpha-Compare simulated annealing and alpha-expansion algorithmexpansion algorithm

Page 3: Overview of graph cuts

2010/5/172010/5/17 33

IntroductionIntroductionDiscrete energy minimization methods Discrete energy minimization methods that can be applied to Markov Random that can be applied to Markov Random Fields (MRF) with binary labels or multi-Fields (MRF) with binary labels or multi-labels.labels.

Page 4: Overview of graph cuts

2010/5/172010/5/17 44

OutlineOutlineIntroductionIntroduction

S-t Graph cutsS-t Graph cuts

Extensions to multi-label problemsExtensions to multi-label problems

Compare simulated annealing and alpha-Compare simulated annealing and alpha-expansion algorithmexpansion algorithm

Page 5: Overview of graph cuts

2010/5/172010/5/17 55

Max flow / Min cut Max flow / Min cut Flow networkFlow network

Maximize amount of flows from source to sinkMaximize amount of flows from source to sink

Equal to minimum capacity removed from the Equal to minimum capacity removed from the network that no flow can pass from the source to the network that no flow can pass from the source to the sink sink

ts

Max-flow/Min-cut method : Augmenting paths (Ford Fulkerson Algorithm)

Page 6: Overview of graph cuts

2010/5/172010/5/17 66

A subset of edges such that source and sink A subset of edges such that source and sink become separatedbecome separated

G(C)=<V,E-C>G(C)=<V,E-C>

the cost of a cut :the cost of a cut :

Minimum cut : a cut whose cost is the least over Minimum cut : a cut whose cost is the least over all cutsall cuts

S-t Graph CutS-t Graph Cut

C E

Page 7: Overview of graph cuts

2010/5/172010/5/17 77

How to separate a graph to two How to separate a graph to two class?class?

Two pixels p1 and p2 corresponds to two Two pixels p1 and p2 corresponds to two class s and t.class s and t.

Pixels p in the Graph classify by Pixels p in the Graph classify by subtracting p with two pixels p1,p2. subtracting p with two pixels p1,p2. d1=(p-p1), d2 = (p-p2)d1=(p-p1), d2 = (p-p2)

If d1 is closer zero than d2, p is class s.If d1 is closer zero than d2, p is class s.

Absolute of d1 and d2 Absolute of d1 and d2

Page 8: Overview of graph cuts

2010/5/172010/5/17 88

Noise in the boundary of two classNoise in the boundary of two class

The classified graph may have the noise The classified graph may have the noise occurs nearing the pixel (p1+p2)/2occurs nearing the pixel (p1+p2)/2

Adding another constrain (smoothing) to Adding another constrain (smoothing) to prevent this problem.prevent this problem.

Page 9: Overview of graph cuts

2010/5/172010/5/17 99

energy functionenergy function

Npq

qppqp

pp ffwfDfE )()()(

},{ tsf p

t-links n-links

Boundary termRegional term

pqw

n-links

t

s a cut C(s)pD

(t)pD

t-lin

k

t-link

Page 10: Overview of graph cuts

2010/5/172010/5/17 1010

S-t Graph cuts for optimal S-t Graph cuts for optimal boundary detectionboundary detection

n-links

t

s a cut Chard constraint

hard constraint

Minimum cost cut can be computed in polynomial

time

Page 11: Overview of graph cuts

2010/5/172010/5/17 1111

Global minimized for binary Global minimized for binary energy functionenergy function

Characterization of Characterization of binarybinary energies that can be energies that can be globally minimized by globally minimized by s-ts-t graph cuts graph cuts

p,q(f ) D (f ) V (f , f )p p p qp pq N

E

f { , }p s t

E(f) can be minimized by s-t graph cuts

V( , ) V( , ) V( , ) V( , )s s t t s t t s

t-links n-links

Boundary termRegional term

(regular function)

Page 12: Overview of graph cuts

2010/5/172010/5/17 1212

Regular FRegular F22 functions: functions:

What Energy Functions Can Be What Energy Functions Can Be Minimized via Graph Cuts?Minimized via Graph Cuts?

Page 13: Overview of graph cuts

2010/5/172010/5/17 1313

OutlineOutlineIntroductionIntroduction

S-t Graph cutsS-t Graph cuts

Extensions to multi-label problemsExtensions to multi-label problems

Compare simulated annealing and alpha-Compare simulated annealing and alpha-expansion algorithmexpansion algorithm

Page 14: Overview of graph cuts

2010/5/172010/5/17 1414

Multi way Graph cut algorithmMulti way Graph cut algorithmNP-hard problem(3 or more labels)NP-hard problem(3 or more labels) two labels can be solved via two labels can be solved via s-ts-t cuts (Greig et. al 1989) cuts (Greig et. al 1989)

Two approximation algorithmsTwo approximation algorithms(Boykov(Boykov et.al 1998,20et.al 1998,2001)01)

Basic idea : Basic idea : break multi-way cut computation into a sbreak multi-way cut computation into a sequence of binary s-t cuts.equence of binary s-t cuts. Alpha-expansionAlpha-expansion Each label competes with the other labels for space in the imaEach label competes with the other labels for space in the ima

gege Alpha-beta swapAlpha-beta swap Define a move which allows to change pixels from alpha to beDefine a move which allows to change pixels from alpha to be

ta and beta to alphata and beta to alpha

Page 15: Overview of graph cuts

2010/5/172010/5/17 1515

other labelsa

Alpha-expansion moveAlpha-expansion moveBreak multi-way cut computation into a sequence of binary s-t cuts

Page 16: Overview of graph cuts

2010/5/172010/5/17 1616

Alpha-expansion algorithmAlpha-expansion algorithm

-expansion

algorithm

(|L| iterations)

Stop when no expansion move would decrease energy

Page 17: Overview of graph cuts

2010/5/172010/5/17 1717

Alpha-expansion algorithmAlpha-expansion algorithmGuaranteed approximation ratio by the algorithm:Guaranteed approximation ratio by the algorithm:Produces a labeling Produces a labeling ff such that , such that ,

where where f*f* is the global minimum is the global minimum

and and *2* fEkfEfE

:,min

:,max

V

Vk

Prove in : efficient graph-based energy minimization methods in computer vision

Page 18: Overview of graph cuts

2010/5/172010/5/17 1818

alphaalpha-expansion moves-expansion moves

initial solution

-expansion

-expansion

-expansion

-expansion

-expansion

-expansion

-expansion

Page 19: Overview of graph cuts

2010/5/172010/5/17 1919

Alpha-Beta swap algorithmAlpha-Beta swap algorithm

- -swap

algorithm

Handles more general energy function

Page 20: Overview of graph cuts

2010/5/172010/5/17 2020

MovesMoves

αexpansionα-βswapInitial labeling

Page 21: Overview of graph cuts

2010/5/172010/5/17 2121

MetricMetricSemi-metric Semi-metric – –

If V also satisfies the triangle inequalityIf V also satisfies the triangle inequality

Page 22: Overview of graph cuts

2010/5/172010/5/17 2222

Alpha-expansion : MetricAlpha-expansion : MetricAlpha-expansion satisfy the regular functionAlpha-expansion satisfy the regular function

Alpha-beta swapAlpha-beta swap

Prove in: what energy functions can be minimized via graph cuts?

Page 23: Overview of graph cuts

2010/5/172010/5/17 2323

Different types of InteractionDifferent types of Interaction V V

V(dL)

dL=Lp-Lq

Potts model

“discontinuity preserving”Interactions V

V(dL)

dL=Lp-Lq

“Convex”Interactions V

V(dL)

dL=Lp-Lq

V(dL)

dL=Lp-Lq

“linear”

model

Page 24: Overview of graph cuts

2010/5/172010/5/17 2424

convexconvex vs. vs. discontinuity-preservingdiscontinuity-preserving””

“linear” V

truncated “linear” V

Page 25: Overview of graph cuts

2010/5/172010/5/17 2525

The use of Alpha-expansion and The use of Alpha-expansion and alpha-beta swap alpha-beta swap

Three energy function, each with a quadratic DThree energy function, each with a quadratic Dpp..– E1 = DE1 = Dpp + min(K,|f + min(K,|fpp-f-fqq||22))– E2 uses the Potts modelE2 uses the Potts model– E3 = DE3 = Dpp + min(K,|f + min(K,|fpp-f-fqq|)|)

E1 : semi-metric (use ) E1 : semi-metric (use ) E2,E3 : metric (can use both) E2,E3 : metric (can use both)

p qV= (f f )

- -s wap

Page 26: Overview of graph cuts

2010/5/172010/5/17 2626

OutlineOutlineIntroductionIntroduction

S-t Graph cutsS-t Graph cuts

Extensions to multi-label problemsExtensions to multi-label problems

Compare simulated annealing and alpha-Compare simulated annealing and alpha-expansion algorithmexpansion algorithm

Page 27: Overview of graph cuts

2010/5/172010/5/17 2727

Single “one-pixel” move (Simulated annealing)

Single alpha-expansion move

Only one pixel change its label at a time

Large number of pixels can change their labels simultaneously

Computationally intensive O(2^n)

(s-t cuts)

Page 28: Overview of graph cuts

2010/5/172010/5/17 2828

參考文獻參考文獻Graph Cuts in Vision and Graphics: Graph Cuts in Vision and Graphics: Theories and ApplicationTheories and Application

Fast Approximate Energy Minimization via Fast Approximate Energy Minimization via Graph Cuts , 2001Graph Cuts , 2001

What energy functions can be minimized What energy functions can be minimized via graph cuts?via graph cuts?