Download presentation
Presentation is loading. Please wait.
Published bySherman Barnett Modified over 9 years ago
1
Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online http://mpawankumar.info
2
Interactive Binary Segmentation Foreground histogram of RGB values FG Background histogram of RGB values BG ‘1’ indicates foreground and ‘0’ indicates background
3
Interactive Binary Segmentation More likely to be foreground than background
4
Interactive Binary Segmentation More likely to be background than foreground θ a (0) proportional to -log(BG(d a )) θ a (1) proportional to -log(FG(d a ))
5
Interactive Binary Segmentation More likely to belong to same label
6
Interactive Binary Segmentation Less likely to belong to same label θ ab (i,k) proportional to exp(-(d a -d b ) 2 ) if i ≠ k θ ab (i,k) = 0 if i = k
7
Outline Minimum Cut Problem Submodular Energy Functions
8
Directed Graph n1n1 n2n2 n3n3 n4n4 10 5 3 2 Important restriction Positive arc lengths D = (N, A)
9
Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 Let N 1 and N 2 such that N 1 “union” N 2 = N N 1 “intersection” N 2 = Φ C is a set of arcs such that (n 1,n 2 ) A n 1 N 1 n 2 N 2 D = (N, A) C is a cut in the digraph D
10
Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 What is C? D = (N, A) N1N1 N2N2 {(n 1,n 2 ),(n 1,n 4 )} ? {(n 1,n 4 ),(n 3,n 2 )} ? {(n 1,n 4 )} ? ✓
11
Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 What is C? D = (N, A) N1N1 N2N2 {(n 1,n 2 ),(n 1,n 4 ),(n 3,n 2 )} ? {(n 1,n 4 ),(n 3,n 2 )} ? {(n 4,n 3 )} ? ✓
12
Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 What is C? D = (N, A) N2N2 N1N1 {(n 1,n 2 ),(n 1,n 4 ),(n 3,n 2 )} ? {(n 1,n 4 ),(n 3,n 2 )} ? {(n 3,n 2 )} ? ✓
13
Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 Let N 1 and N 2 such that N 1 “union” N 2 = N N 1 “intersection” N 2 = Φ C is a set of arcs such that (n 1,n 2 ) A n 1 N 1 n 2 N 2 D = (N, A) C is a cut in the digraph D
14
Weight of a Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 Sum of length of all arcs in C D = (N, A)
15
Weight of a Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 w(C) = Σ (n 1,n 2 ) C l(n 1,n 2 ) D = (N, A)
16
Weight of a Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 What is w(C)? D = (N, A) N1N1 N2N2 3
17
Weight of a Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 What is w(C)? D = (N, A) N1N1 N2N2 5
18
Weight of a Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 What is w(C)? D = (N, A) N2N2 N1N1 15
19
st-Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 A source “s” C is a cut such that s N 1 t N 2 D = (N, A) C is an st-cut s t A sink “t” 12 73
20
Weight of an st-Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 D = (N, A) s t 12 73 w(C) = Σ (n 1,n 2 ) C l(n 1,n 2 )
21
Weight of an st-Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 D = (N, A) s t 12 73 What is w(C)? 3
22
Weight of an st-Cut n1n1 n2n2 n3n3 n4n4 10 5 3 2 D = (N, A) s t 12 73 What is w(C)? 15
23
Minimum Cut Problem n1n1 n2n2 n3n3 n4n4 10 5 3 2 D = (N, A) s t 12 73 Find a cut with the minimum weight !! C* = argmin C w(C)
24
[Slide credit: Andrew Goldberg] Augmenting Path and Push-Relabel n: #nodes m: #arcs U: maximum arc length Solvers for the Minimum-Cut Problem
25
Outline Minimum Cut Problem Submodular Energy Functions Hammer, 1965; Kolmogorov and Zabih, 2004
26
Overview Energy Q Digraph D Digraph D One nodes per element N = N 1 U N 2 N = N 1 U N 2 Compute Minimum Cut + Additional nodes “s” and “t” Optimal solution Optimal solution n a N 1 implies x a = 0 n a N 2 implies x a = 1
27
Outline Minimum Cut Problem Submodular Energy Functions Unary Potentials Pairwise Potentials
28
Digraph for Unary Potentials P Q x a = 0 x a = 1
29
Digraph for Unary Potentials nana P Q s t x a = 0 x a = 1
30
Digraph for Unary Potentials nana P Q s t Let P ≥ Q P-Q 0 Q Q + Constant P-Q x a = 0 x a = 1
31
Digraph for Unary Potentials nana P Q s t Let P ≥ Q P-Q 0 Q Q + Constant P-Q x a = 1 w(C) = 0 x a = 0 x a = 1
32
Digraph for Unary Potentials nana P Q s t Let P ≥ Q P-Q 0 Q Q + Constant P-Q x a = 0 w(C) = P-Q x a = 0 x a = 1
33
Digraph for Unary Potentials nana P Q s t Let P < Q 0 Q-P P P + Constant Q-P x a = 0 x a = 1
34
Digraph for Unary Potentials nana P Q s t Let P < Q 0 Q-P P P + Constant x a = 1 w(C) = Q-P Q-P x a = 0 x a = 1
35
Digraph for Unary Potentials nana P Q s t Let P < Q 0 Q-P P P + Constant x a = 0 w(C) = 0 Q-P x a = 0 x a = 1
36
Outline Minimum Cut Problem Submodular Energy Functions Unary Potentials Pairwise Potentials
37
Digraph for Pairwise Potentials PR QS x a = 0x a = 1 x b = 0 x b = 1 00 Q-P 0S-Q 0 0R+Q-S-P 00 + + + PP PP
38
Digraph for Pairwise Potentials nana nbnb PR QS 00 Q-P 0S-Q 0 0R+Q-S-P 00 + + + PP PP s t Constant x a = 0x a = 1 x b = 0 x b = 1
39
Digraph for Pairwise Potentials nana nbnb PR QS 00 Q-P 0S-Q 0 0R+Q-S-P 00 + + s t Unary Potential x b = 1 Q-P x a = 0x a = 1 x b = 0 x b = 1
40
Digraph for Pairwise Potentials nana nbnb PR QS 0S-Q 0 0R+Q-S-P 00 + s t Unary Potential x a = 1 Q-PS-Q x a = 0x a = 1 x b = 0 x b = 1
41
Digraph for Pairwise Potentials nana nbnb PR QS 0R+Q-S-P 00 s t Pairwise Potential x a = 1, x b = 0 Q-PS-Q R+Q-S-P x a = 0x a = 1 x b = 0 x b = 1
42
Digraph for Pairwise Potentials nana nbnb PR QS s t Q-PS-Q R+Q-S-P R+Q-S-P ≥ 0 x a = 0x a = 1 x b = 0 x b = 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.