Transcript Document
Overview of graph cuts
2010/5/17
1
Outline
Introduction
S-t Graph cuts
Extension to multi-label problems
Compare simulated annealing and alphaexpansion algorithm
2010/5/17
2
Introduction
Discrete energy minimization methods
that can be applied to Markov Random
Fields (MRF) with binary labels or multilabels.
2010/5/17
3
Outline
Introduction
S-t Graph cuts
Extensions to multi-label problems
Compare simulated annealing and alphaexpansion algorithm
2010/5/17
4
Max flow / Min cut
Flow network
Maximize amount of flows from source to sink
Equal to minimum capacity removed from the
network that no flow can pass from the source to the
sink
s
t
Max-flow/Min-cut method : Augmenting paths (Ford Fulkerson Algorithm)
2010/5/17
5
S-t Graph Cut
A subset of edges C E such that source and
sink become separated
G(C)=<V,E-C>
the cost of a cut :
Minimum cut : a cut whose cost is the least
over all cuts
2010/5/17
6
How to separate a graph to two
class?
Two pixels p1 and p2 corresponds to two
class s and t.
Pixels p in the Graph classify by
subtracting p with two pixels p1,p2.
d1=(p-p1), d2 = (p-p2)
If d1 is closer zero than d2, p is class s.
Absolute of d1 and d2
2010/5/17
7
Noise in the boundary of two class
The classified graph may have the noise
occurs nearing the pixel (p1+p2)/2
Adding another constrain (smoothing) to
prevent this problem.
2010/5/17
8
energy function
Regional term
E( f )
D (f
p
p
Dp (s)
p
)
t-links
s
n-links
a cut C
Boundary term
w
pqN
pq
( f p fq )
n-links
f p {s, t}
w pq
Dp (t)
t
2010/5/17
9
S-t Graph cuts for optimal
boundary detection
hard
constraint
s
n-links
a cut C
hard
constraint
Minimum cost cut can be
computed in polynomial time
2010/5/17
t
10
Global minimized for binary
energy function
Regional term
E(f )
D
p
p
(f p )
t-links
Boundary term
V
pqN
p,q
(f p ,f q )
n-links
f p {s, t}
Characterization of binary energies that can be
globally minimized by s-t graph cuts
E(f) can be minimized
by s-t graph cuts
2010/5/17
V(s, s) V(t, t) V(s, t) V(t, s)
(regular function)
11
What Energy Functions Can Be
Minimized via Graph Cuts?
Regular F2 functions:
2010/5/17
12
Outline
Introduction
S-t Graph cuts
Extensions to multi-label problems
Compare simulated annealing and alphaexpansion algorithm
2010/5/17
13
Multi way Graph cut algorithm
NP-hard problem(3 or more labels)
two labels can be solved via s-t cuts (Greig et. al 1989)
Two approximation algorithms(Boykov
1998,2001)
et.al
Basic idea : break multi-way cut computation
into a sequence of binary s-t cuts.
Alpha-expansion
Each label competes with the other labels for space in
the image
Alpha-beta swap
Define a move which allows to change pixels from alpha
to beta and beta to alpha
2010/5/17
14
Alpha-expansion move
Break multi-way cut computation
into a sequence of binary s-t cuts
a
2010/5/17
other labels
15
Alpha-expansion algorithm
(|L| iterations)
-expansion
algorithm
Stop when no expansion move would decrease energy
2010/5/17
16
Alpha-expansion algorithm
Guaranteed approximation ratio by the algorithm:
Produces a labeling f such that
, where f* is the global minimum
and
maxV , :
k
minV , :
E f * E f 2k E f *
Prove in : efficient graph-based energy minimization methods in
computer vision
2010/5/17
17
alpha-expansion moves
initial solution
-expansion
-expansion
-expansion
-expansion
-expansion
-expansion
-expansion
2010/5/17
18
Alpha-Beta swap algorithm
- -swap
algorithm
Handles more general energy function
2010/5/17
19
Moves
Initial labeling
2010/5/17
α-βswap
αexpansion
20
Metric
Semi-metric
–
–
If V also satisfies the triangle inequality
2010/5/17
21
Alpha-expansion : Metric
Alpha-expansion satisfy the regular function
Alpha-beta swap
Prove in: what energy functions can be minimized via graph cuts?
2010/5/17
22
Different types of Interaction V
“Convex”
Interactions V
“discontinuity preserving”
Interactions V
V(dL)
V(dL)
Potts
model
“linear”
model
dL=Lp-Lq
dL=Lp-Lq
V(dL)
V(dL)
2010/5/17
dL=Lp-Lq
dL=Lp-Lq
23
convex vs. discontinuity-preserving”
“linear” V
truncated
“linear” V
2010/5/17
24
The use of Alpha-expansion and
alpha-beta swap
Three energy function, each with a
quadratic Dp.
– E1 = Dp + min(K,|fp-fq|2)
– E2 uses the Potts model V= (fp fq )
– E3 = Dp + min(K,|fp-fq|)
E1 : semi-metric (use - -swap )
E2,E3 : metric (can use both)
2010/5/17
25
Outline
Introduction
S-t Graph cuts
Extensions to multi-label problems
Compare simulated annealing and alphaexpansion algorithm
2010/5/17
26
Single “one-pixel” move
(Simulated annealing)
Only one pixel change its label at a
time
Single alpha-expansion
move
Large number of pixels can change
their labels simultaneously
Computationally intensive O(2^n)
(s-t cuts)
2010/5/17
27
參考文獻
Graph Cuts in Vision and Graphics:
Theories and Application
Fast Approximate Energy Minimization via
Graph Cuts , 2001
What energy functions can be minimized
via graph cuts?
2010/5/17
28