Download - Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar [email protected] Slides available online
![Page 1: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/1.jpg)
Discrete OptimizationLecture 5 – Part 2
M. Pawan Kumar
Slides available online http://mpawankumar.info
![Page 2: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/2.jpg)
Interactive Binary Segmentation
Foreground histogram of RGB values FG
Background histogram of RGB values BG
‘1’ indicates foreground and ‘0’ indicates background
![Page 3: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/3.jpg)
Interactive Binary Segmentation
More likely to be foreground than background
![Page 4: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/4.jpg)
Interactive Binary Segmentation
More likely to be background than foreground
θa(0) proportional to -log(BG(da))
θa(1) proportional to -log(FG(da))
![Page 5: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/5.jpg)
Interactive Binary Segmentation
More likely to belong to same label
![Page 6: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/6.jpg)
Interactive Binary Segmentation
Less likely to belong to same label
θab(i,k) proportional to exp(-(da-db)2) if i ≠ k
θab(i,k) = 0 if i = k
![Page 7: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/7.jpg)
Outline
• Minimum Cut Problem
• Submodular Energy Functions
![Page 8: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/8.jpg)
Directed Graph
n1 n2
n3 n4
10
5
3 2
Important restriction
Positive arc lengths
D = (N, A)
![Page 9: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/9.jpg)
Cut
n1 n2
n3 n4
10
5
3 2
Let N1 and N2 such that
• N1 “union” N2 = N
• N1 “intersection” N2 = Φ
C is a set of arcs such that• (n1,n2) A• n1 N1
• n2 N2
D = (N, A)
C is a cut in the digraph D
![Page 10: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/10.jpg)
Cut
n1 n2
n3 n4
10
5
3 2
What is C?
D = (N, A)
N1
N2
{(n1,n2),(n1,n4)} ?
{(n1,n4),(n3,n2)} ?
{(n1,n4)} ?✓
![Page 11: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/11.jpg)
Cut
n1 n2
n3 n4
10
5
3 2
What is C?
D = (N, A)N1N2
{(n1,n2),(n1,n4),(n3,n2)} ?
{(n1,n4),(n3,n2)} ?
{(n4,n3)} ?✓
![Page 12: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/12.jpg)
Cut
n1 n2
n3 n4
10
5
3 2
What is C?
D = (N, A)N2N1
{(n1,n2),(n1,n4),(n3,n2)} ?
{(n1,n4),(n3,n2)} ?
{(n3,n2)} ?
✓
![Page 13: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/13.jpg)
Cut
n1 n2
n3 n4
10
5
3 2
Let N1 and N2 such that
• N1 “union” N2 = N
• N1 “intersection” N2 = Φ
C is a set of arcs such that• (n1,n2) A• n1 N1
• n2 N2
D = (N, A)
C is a cut in the digraph D
![Page 14: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/14.jpg)
Weight of a Cut
n1 n2
n3 n4
10
5
3 2 Sum of length of allarcs in C
D = (N, A)
![Page 15: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/15.jpg)
Weight of a Cut
n1 n2
n3 n4
10
5
3 2 w(C) = Σ(n1,n2) C l(n1,n2)
D = (N, A)
![Page 16: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/16.jpg)
Weight of a Cut
n1 n2
n3 n4
10
5
3 2
What is w(C)?
D = (N, A)
N1
N2
3
![Page 17: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/17.jpg)
Weight of a Cut
n1 n2
n3 n4
10
5
3 2
What is w(C)?
D = (N, A)N1N2
5
![Page 18: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/18.jpg)
Weight of a Cut
n1 n2
n3 n4
10
5
3 2
What is w(C)?
D = (N, A)N2N1
15
![Page 19: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/19.jpg)
st-Cut
n1 n2
n3 n4
10
5
3 2
A source “s”
C is a cut such that• s N1
• t N2
D = (N, A)
C is an st-cut
s
t
A sink “t”
1 2
7 3
![Page 20: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/20.jpg)
Weight of an st-Cut
n1 n2
n3 n4
10
5
3 2
D = (N, A)s
t
1 2
7 3
w(C) = Σ(n1,n2) C l(n1,n2)
![Page 21: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/21.jpg)
Weight of an st-Cut
n1 n2
n3 n4
10
5
3 2
D = (N, A)s
t
1 2
7 3
What is w(C)?
3
![Page 22: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/22.jpg)
Weight of an st-Cut
n1 n2
n3 n4
10
5
3 2
D = (N, A)s
t
1 2
7 3
What is w(C)?
15
![Page 23: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/23.jpg)
Minimum Cut Problem
n1 n2
n3 n4
10
5
3 2
D = (N, A)s
t
1 2
7 3
Find a cut with theminimum weight !!
C* = argminC w(C)
![Page 24: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/24.jpg)
[Slide credit: Andrew Goldberg]
Augmenting Path and Push-Relabel
n: #nodes
m: #arcs
U: maximumarc length
Solvers for the Minimum-Cut Problem
![Page 25: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/25.jpg)
Outline
• Minimum Cut Problem
• Submodular Energy Functions
Hammer, 1965; Kolmogorov and Zabih, 2004
![Page 26: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/26.jpg)
Overview
Energy Q
DigraphD
One nodes per element
N = N1 U N2
ComputeMinimum
Cut
+ Additional nodes “s” and “t”
Optimalsolution
na N1 implies xa = 0
na N2 implies xa = 1
![Page 27: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/27.jpg)
Outline
• Minimum Cut Problem
• Submodular Energy Functions• Unary Potentials• Pairwise Potentials
![Page 28: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/28.jpg)
Digraph for Unary Potentials
P
Q
xa = 0
xa = 1
![Page 29: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/29.jpg)
Digraph for Unary Potentials
na
P
Q
s
t
xa = 0
xa = 1
![Page 30: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/30.jpg)
Digraph for Unary Potentials
na
P
Q
s
t
Let P ≥ Q
P-Q
0
Q
Q+
ConstantP-Q
xa = 0
xa = 1
![Page 31: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/31.jpg)
Digraph for Unary Potentials
na
P
Q
s
t
Let P ≥ Q
P-Q
0
Q
Q+
ConstantP-Q
xa = 1
w(C) = 0
xa = 0
xa = 1
![Page 32: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/32.jpg)
Digraph for Unary Potentials
na
P
Q
s
t
Let P ≥ Q
P-Q
0
Q
Q+
ConstantP-Q
xa = 0
w(C) = P-Q
xa = 0
xa = 1
![Page 33: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/33.jpg)
Digraph for Unary Potentials
na
P
Q
s
t
Let P < Q
0
Q-P
P
P+
Constant
Q-P
xa = 0
xa = 1
![Page 34: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/34.jpg)
Digraph for Unary Potentials
na
P
Q
s
t
Let P < Q
0
Q-P
P
P+
Constant
xa = 1
w(C) = Q-P
Q-P
xa = 0
xa = 1
![Page 35: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/35.jpg)
Digraph for Unary Potentials
na
P
Q
s
t
Let P < Q
0
Q-P
P
P+
Constant
xa = 0
w(C) = 0
Q-P
xa = 0
xa = 1
![Page 36: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/36.jpg)
Outline
• Minimum Cut Problem
• Submodular Energy Functions• Unary Potentials• Pairwise Potentials
![Page 37: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/37.jpg)
Digraph for Pairwise Potentials
P R
Q S
xa = 0 xa = 1
xb = 0
xb = 1
0 0
Q-P Q-P
0 S-Q
0 S-Q
0 R+Q-S-P
0 0+ + +
P P
P P
![Page 38: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/38.jpg)
Digraph for Pairwise Potentials
na nb
P R
Q S
0 0
Q-P Q-P
0 S-Q
0 S-Q
0 R+Q-S-P
0 0+ + +
P P
P P
s
t
Constant
xa = 0 xa = 1
xb = 0
xb = 1
![Page 39: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/39.jpg)
Digraph for Pairwise Potentials
na nb
P R
Q S
0 0
Q-P Q-P
0 S-Q
0 S-Q
0 R+Q-S-P
0 0+ +
s
tUnary Potential
xb = 1
Q-P
xa = 0 xa = 1
xb = 0
xb = 1
![Page 40: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/40.jpg)
Digraph for Pairwise Potentials
na nb
P R
Q S
0 S-Q
0 S-Q
0 R+Q-S-P
0 0+
s
t
Unary Potentialxa = 1
Q-PS-Q
xa = 0 xa = 1
xb = 0
xb = 1
![Page 41: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/41.jpg)
Digraph for Pairwise Potentials
na nb
P R
Q S
0 R+Q-S-P
0 0
s
t
Pairwise Potentialxa = 1, xb = 0
Q-PS-Q
R+Q-S-P
xa = 0 xa = 1
xb = 0
xb = 1
![Page 42: Discrete Optimization Lecture 5 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online](https://reader035.vdocument.in/reader035/viewer/2022062422/56649efb5503460f94c0e0ea/html5/thumbnails/42.jpg)
Digraph for Pairwise Potentials
na nb
P R
Q S s
t
Q-PS-Q
R+Q-S-P
R+Q-S-P ≥ 0
xa = 0 xa = 1
xb = 0
xb = 1