1 / 50

Optimization - Lecture 4, Part 0

Discover the principles of energy minimization techniques in optimization through this detailed lecture. Learn about submodular energy functions and move-making algorithms. Slides available online for reference.

Télécharger la présentation

Optimization - Lecture 4, Part 0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Optimization- Lecture 4, Part 0 M. Pawan Kumar http://www.robots.ox.ac.uk/~oval/ Slides available online http://mpawankumar.info

  2. Energy Minimization Vb Vc Vd Va

  3. Energy Minimization 6 3 2 4 Label l1 Label l0 5 3 7 2 Vb Vc Vd Va Q(f;) = ∑a a(f(a))

  4. Energy Minimization 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va Q(f;) = ∑a a(f(a)) +∑(a,b) ab(f(a),f(b))

  5. Energy Minimization 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va Q(f;) = ∑a a(f(a)) +∑(a,b) ab(f(a),f(b))

  6. Energy Minimization 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va Q(f;) = ∑a a(f(a)) +∑(a,b) ab(f(a),f(b)) 2 + 1 + 2 + 1 + 3 + 1 + 3 = 13

  7. Energy Minimization 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va Q(f;) = ∑a a(f(a)) +∑(a,b) ab(f(a),f(b))

  8. Energy Minimization 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va Q(f;) = ∑a a(f(a)) +∑(a,b) ab(f(a),f(b)) 5 + 1 + 4 + 0 + 6 + 4 + 7 = 27

  9. Energy Minimization 0 6 1 3 2 0 4 Label l1 1 2 3 4 1 1 Label l0 1 0 5 0 3 7 2 Vb Vc Vd Va No loops Q(f;) = ∑a a(f(a)) +∑(a,b) ab(f(a),f(b)) q* = min Q(f; ) = Q(f*; ) Solve using dynamic programming

  10. Energy Minimization Q(f;) = ∑a a(f(a)) +∑(a,b) ab(f(a),f(b)) q* = min Q(f; ) = Q(f*; ) In general, NP-hard

  11. Outline • Minimum Cut Problem • Two-Label Submodular Energy Functions • Move-Making Algorithms

  12. Cut D = (N, A) • Let N1 and N2 such that • N1 “union” N2 = N • N1 “intersection” N2 = Φ 10 n1 n2 3 2 • C is a set of arcs such that • (n1,n2)  A • n1  N1 • n2  N2 n3 n4 5 C is a cut in the digraph D

  13. Cut D = (N, A) N1 What is C? 10 n1 n2 {(n1,n2),(n1,n4)} ? 3 2 {(n1,n4),(n3,n2)} ? ✓ n3 n4 {(n1,n4)} ? 5 N2

  14. Weight of a Cut D = (N, A) 10 n1 n2 3 Sum of length of all arcs in C 2 n3 n4 5

  15. Weight of a Cut D = (N, A) N1 What is w(C)? 10 n1 n2 3 3 2 n3 n4 5 N2

  16. st-Cut s D = (N, A) 1 2 A source “s” 10 n1 n2 A sink “t” 3 2 • C is a cut such that • s  N1 • t  N2 n3 n4 5 7 t 3 C is an st-cut

  17. Weight of an st-Cut s D = (N, A) 1 2 10 n1 n2 3 w(C) = Σ(n1,n2) C l(n1,n2) 2 n3 n4 5 7 t 3

  18. Weight of an st-Cut s D = (N, A) 1 2 What is w(C)? 10 n1 n2 3 3 2 n3 n4 5 7 t 3

  19. Minimum Cut Problem s D = (N, A) 1 2 Find a cut with the minimum weight !! 10 n1 n2 3 2 C* = argminC w(C) n3 n4 5 Non-negative arc lengths 7 t 3

  20. Solvers for the Minimum-Cut Problem Augmenting Path and Push-Relabel n: #nodes m: #arcs U: maximum arc length [Slide credit: Andrew Goldberg]

  21. Outline • Minimum Cut Problem • Two-Label Submodular Energy Functions • Move-Making Algorithms Hammer, 1965; Kolmogorov and Zabih, 2004

  22. Overview Digraph D Energy Q One node per random variable + Additional nodes “s” and “t” Compute Minimum Cut na N1 implies f(a) = 0 Labeling f* N = N1 U N2 na N2 implies f(a) = 1

  23. Outline • Minimum Cut Problem • Two-Label Submodular Energy Functions • Unary Potentials • Pairwise Potentials • Move-Making Algorithms

  24. Digraph for Unary Potentials θa(1) f(a) = 0 θa(0) f(a) = 1 Va

  25. Digraph for Unary Potentials s f(a) = 0 f(a) = 1 na t

  26. Digraph for Unary Potentials Let P ≥ Q s f(a) = 0 f(a) = 1 na Constant P-Q t +

  27. Digraph for Unary Potentials Let P ≥ Q s f(a) = 0 f(a) = 1 f(a) = 1 na Constant P-Q w(C) = 0 t +

  28. Digraph for Unary Potentials Let P ≥ Q s f(a) = 0 f(a) = 1 f(a) = 0 na Constant P-Q w(C) = P-Q t +

  29. Digraph for Unary Potentials Let P < Q s f(a) = 0 Q-P f(a) = 1 na Constant t +

  30. Digraph for Unary Potentials Let P < Q s f(a) = 0 Q-P f(a) = 1 f(a) = 1 na Constant w(C) = Q-P t +

  31. Digraph for Unary Potentials Let P < Q s f(a) = 0 Q-P f(a) = 1 f(a) = 0 na Constant w(C) = 0 t +

  32. Outline • Minimum Cut Problem • Two-Label Submodular Energy Functions • Unary Potentials • Pairwise Potentials • Move-Making Algorithms

  33. Digraph for Pairwise Potentials f(a) = 0 f(a) = 1 θab(1,1) f(b) = 0 θab(0,1) θab(1,0) f(b) = 1 θab(0,0) Va Vb + + +

  34. Digraph for Pairwise Potentials f(a) = 0 f(a) = 1 f(b) = 0 s f(b) = 1 na nb Constant t + + +

  35. Digraph for Pairwise Potentials f(a) = 0 f(a) = 1 f(b) = 0 s Q-P f(b) = 1 na nb Unary Potential f(b) = 1 t + +

  36. Digraph for Pairwise Potentials f(a) = 0 f(a) = 1 f(b) = 0 s S-Q Q-P f(b) = 1 na nb t Unary Potential f(a) = 1 +

  37. Digraph for Pairwise Potentials f(a) = 0 f(a) = 1 f(b) = 0 s S-Q Q-P f(b) = 1 R+Q-S-P na nb t Pairwise Potential f(a) = 1, f(b) = 0

  38. Digraph for Pairwise Potentials f(a) = 0 f(a) = 1 f(b) = 0 s S-Q Q-P f(b) = 1 R+Q-S-P na nb t R+Q-S-P ≥ 0 General 2-label problem is NP-hard

  39. Outline • Minimum Cut Problem • Two-Label Submodular Energy Functions • Move-Making Algorithms (Multiple Labels)

  40. Stereo Correspondence Disparity Map

  41. Stereo Correspondence L= {disparities} Pixel (xa,ya) in left corresponds to pixel (xa+f(a),ya) in right

  42. Stereo Correspondence L= {disparities} θa(i) is proportional to the difference in intensity values (IL(xa,ya) – IR(xa+i,ya))2

  43. Stereo Correspondence L= {disparities} θab(i,k) = wab d(i,k) d: Distance function over labels wab ∝ exp(-|IL(xa,ya)-IL(xb,yb)|)

  44. Move-Making Algorithms Space of All Labelings f

  45. Expansion Algorithm Initialize labeling f = f0 (say f0(a) = 0, for all Va) For α = 0, 2, … , h-1 fα = argminf’ Q(f’) s.t. f’(a)  {f(a)} U {lα} Repeat until convergence Update f = fα End Boykov, Veksler and Zabih, 2001

  46. Expansion Algorithm Variables take label lα or retain current label Slide courtesy PushmeetKohli

  47. Expansion Algorithm Variables take label lα or retain current label Tree Ground House Status: Initialize with Tree Expand Ground Expand House Expand Sky Sky Slide courtesy PushmeetKohli

  48. Expansion Algorithm Restriction on pairwise potentials? θab(i,k) + θab(α,α) ≤ θab(i,α) + θab(α,k) θab(i,k) = wab d(i,k) d(.,.) is a metric distance function

  49. Swap Algorithm Initialize labeling f = f0 (say f0(a) = 0, for all Va) For α, β = 0, 2, … , h-1 fαβ= argminf’ Q(f’) s.t. f’(a)  {lα,lβ} if f(a)  {lα,lβ} f’(a) = f(a) otherwise Repeat until convergence Update f = fαβ End Boykov, Veksler and Zabih, 2001

  50. Swap Algorithm Restriction on pairwise potentials? θab(α,α) + θab(β,β) ≤ θab(α,β) + θab(β,α) θab(i,k) = wab d(i,k) d(.,.) is a semi-metric distance function

More Related