1 / 134

MAP Estimation Algorithms in

MAP Estimation Algorithms in. Computer Vision - Part II. M. Pawan Kumar, University of Oxford Pushmeet Kohli, Microsoft Research. Example: Image Segmentation. E: {0,1} n → R 0 → fg 1 → bg. E(x) = ∑ c i x i + ∑ c ij x i (1-x j ). i. i,j. n = number of pixels. Image (D).

yale
Télécharger la présentation

MAP Estimation Algorithms in

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. MAP Estimation Algorithms in Computer Vision - Part II M. Pawan Kumar, University of Oxford Pushmeet Kohli, Microsoft Research

  2. Example: Image Segmentation E: {0,1}n→R 0 → fg 1 → bg E(x) = ∑ ci xi + ∑cij xi(1-xj) i i,j n = number of pixels Image (D)

  3. Example: Image Segmentation E: {0,1}n→R 0 → fg 1 → bg E(x) = ∑ ci xi + ∑cij xi(1-xj) i i,j n = number of pixels Unary Cost (ci) Dark (negative) Bright (positive)

  4. Example: Image Segmentation E: {0,1}n→R 0 → fg 1 → bg E(x) = ∑ ci xi + ∑cij xi(1-xj) i i,j n = number of pixels Discontinuity Cost (cij)

  5. Example: Image Segmentation E: {0,1}n→R 0 → fg 1 → bg E(x) = ∑ ci xi + ∑cij xi(1-xj) i i,j n = number of pixels x*= arg min E(x) x How to minimize E(x)? Global Minimum (x*)

  6. Outline of the Tutorial The st-mincut problem Connection between st-mincut and energy minimization? What problems can we solve using st-mincut? st-mincut based Move algorithms Recent Advances and Open Problems

  7. Outline of the Tutorial The st-mincut problem Connection between st-mincut and energy minimization? What problems can we solve using st-mincut? st-mincut based Move algorithms Recent Advances and Open Problems

  8. The st-Mincut Problem • Graph (V, E, C) • Vertices V = {v1, v2 ... vn} • Edges E = {(v1, v2) ....} • Costs C = {c(1, 2) ....} Source 2 9 1 v1 v2 2 5 4 Sink

  9. The st-Mincut Problem What is a st-cut? Source 2 9 1 v1 v2 2 5 4 Sink

  10. The st-Mincut Problem What is a st-cut? An st-cut (S,T) divides the nodes between source and sink. Source 2 9 What is the cost of a st-cut? Sum of cost of all edges going from S to T 1 v1 v2 2 5 4 Sink 5 + 2 + 9 = 16

  11. The st-Mincut Problem What is a st-cut? An st-cut (S,T) divides the nodes between source and sink. Source 2 9 What is the cost of a st-cut? Sum of cost of all edges going from S to T 1 v1 v2 2 5 4 What is the st-mincut? Sink st-cut with the minimum cost 2 + 1 + 4 = 7

  12. How to compute the st-mincut? Solve the dual maximum flow problem Compute the maximum flow between Source and Sink Source Constraints Edges: Flow < Capacity Nodes: Flow in = Flow out 2 9 1 v1 v2 2 5 4 Min-cut\Max-flow Theorem Sink In every network, the maximum flow equals the cost of the st-mincut

  13. Maxflow Algorithms Flow = 0 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 2 9 1 v1 v2 2 5 4 Sink Algorithms assume non-negative capacity

  14. Maxflow Algorithms Flow = 0 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 2 9 1 v1 v2 2 5 4 Sink Algorithms assume non-negative capacity

  15. Maxflow Algorithms Flow = 0 + 2 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 2-2 9 1 v1 v2 2 4 5-2 Sink Algorithms assume non-negative capacity

  16. Maxflow Algorithms Flow = 2 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 9 1 v1 v2 2 3 4 Sink Algorithms assume non-negative capacity

  17. Maxflow Algorithms Flow = 2 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 9 1 v1 v2 2 3 4 Sink Algorithms assume non-negative capacity

  18. Maxflow Algorithms Flow = 2 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 9 1 v1 v2 2 3 4 Sink Algorithms assume non-negative capacity

  19. Maxflow Algorithms Flow = 2 + 4 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 5 1 v1 v2 2 3 0 Sink Algorithms assume non-negative capacity

  20. Maxflow Algorithms Flow = 6 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 5 1 v1 v2 2 3 0 Sink Algorithms assume non-negative capacity

  21. Maxflow Algorithms Flow = 6 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 5 1 v1 v2 2 3 0 Sink Algorithms assume non-negative capacity

  22. Maxflow Algorithms Flow = 6 + 1 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 4 1-1 v1 v2 2+1 2 0 Sink Algorithms assume non-negative capacity

  23. Maxflow Algorithms Flow = 7 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 4 0 v1 v2 3 2 0 Sink Algorithms assume non-negative capacity

  24. Maxflow Algorithms Flow = 7 Augmenting Path Based Algorithms Source Find path from source to sink with positive capacity Push maximum possible flow through this path Repeat until no path can be found 0 4 0 v1 v2 3 2 0 Sink Algorithms assume non-negative capacity

  25. History of Maxflow Algorithms n: #nodes m: #edges U: maximum edge weight Augmenting Path and Push-Relabel Algorithms assume non-negative edge weights [Slide credit: Andrew Goldberg]

  26. History of Maxflow Algorithms n: #nodes m: #edges U: maximum edge weight Augmenting Path and Push-Relabel Algorithms assume non-negative edge weights [Slide credit: Andrew Goldberg]

  27. Augmenting Path based Algorithms Ford Fulkerson: Choose any augmenting path Source 1000 1000 1 a1 a2 0 1000 1000 Sink

  28. Augmenting Path based Algorithms Ford Fulkerson: Choose any augmenting path Source 1000 1000 1 a1 a2 Bad Augmenting Paths 0 1000 1000 Sink

  29. Augmenting Path based Algorithms Ford Fulkerson: Choose any augmenting path Source 1000 1000 1 a1 a2 Bad Augmenting Path 0 1000 1000 Sink

  30. Augmenting Path based Algorithms Ford Fulkerson: Choose any augmenting path Source 999 1000 0 a1 a2 1 1000 999 Sink

  31. Augmenting Path based Algorithms n: #nodes m: #edges Ford Fulkerson: Choose any augmenting path Source 999 1000 0 a1 a2 1 1000 999 Sink We will have to perform 2000 augmentations! Worst case complexity: O (m x Total_Flow) (Pseudo-polynomial bound: depends on flow)

  32. Augmenting Path based Algorithms n: #nodes m: #edges Dinic: Choose shortest augmenting path Source 1000 1000 1 a1 a2 0 1000 1000 Sink Worst case Complexity: O (m n2)

  33. Maxflow in Computer Vision • Specialized algorithms for vision problems • Grid graphs • Low connectivity (m ~ O(n)) • Dual search tree augmenting path algorithm [Boykov and Kolmogorov PAMI 2004] • Finds approximate shortest augmenting paths efficiently • High worst-case time complexity • Empirically outperforms other algorithms on vision problems

  34. Maxflow in Computer Vision • Specialized algorithms for vision problems • Grid graphs • Low connectivity (m ~ O(n)) • Dual search tree augmenting path algorithm [Boykov and Kolmogorov PAMI 2004] • Finds approximate shortest augmenting paths efficiently • High worst-case time complexity • Empirically outperforms other algorithms on vision problems • Efficient code available on the web http://www.adastral.ucl.ac.uk/~vladkolm/software.html

  35. Outline of the Tutorial The st-mincut problem Connection between st-mincut and energy minimization? What problems can we solve using st-mincut? st-mincut based Move algorithms Recent Advances and Open Problems

  36. st-mincut S T St-mincut and Energy Minimization Minimizing a Qudratic Pseudoboolean function E(x) Functions of boolean variables Pseudoboolean? E: {0,1}n→R E(x) = ∑ ci xi + ∑cij xi(1-xj) cij≥0 i i,j Polynomial time st-mincut algorithms require non-negative edge weights

  37. st-mincut S Solution T So how does this work? Construct a graph such that: Any st-cut corresponds to an assignment of x The cost of the cut is equal to the energy of x : E(x) E(x)

  38. Graph Construction E(a1,a2) Source (0) a1 a2 Sink (1)

  39. Graph Construction E(a1,a2) = 2a1 Source (0) 2 a1 a2 Sink (1)

  40. Graph Construction E(a1,a2) = 2a1 + 5ā1 Source (0) 2 a1 a2 5 Sink (1)

  41. Graph Construction E(a1,a2) = 2a1 + 5ā1+ 9a2 + 4ā2 Source (0) 9 2 a1 a2 5 4 Sink (1)

  42. Graph Construction E(a1,a2) = 2a1 + 5ā1+ 9a2 + 4ā2 + 2a1ā2 Source (0) 9 2 a1 a2 2 5 4 Sink (1)

  43. Graph Construction E(a1,a2) = 2a1 + 5ā1+ 9a2 + 4ā2 + 2a1ā2 +ā1a2 Source (0) 9 2 1 a1 a2 2 5 4 Sink (1)

  44. Graph Construction E(a1,a2) = 2a1 + 5ā1+ 9a2 + 4ā2 + 2a1ā2 +ā1a2 Source (0) 9 2 1 a1 a2 2 5 4 Sink (1)

  45. Graph Construction E(a1,a2) = 2a1+ 5ā1+ 9a2+ 4ā2+ 2a1ā2+ā1a2 Source (0) 9 2 Cost of cut = 11 1 a1 = 1 a2 = 1 a1 a2 2 E(1,1) = 11 5 4 Sink (1)

  46. Graph Construction E(a1,a2) = 2a1+ 5ā1+ 9a2+ 4ā2+ 2a1ā2+ā1a2 Source (0) 9 2 st-mincut cost = 8 1 a1 = 1 a2 = 0 a1 a2 2 E(1,0) = 8 5 4 Sink (1)

  47. Energy Function Reparameterization Two functions E1 and E2 are reparameterizations if E1 (x) = E2 (x) for all x For instance: E1 (a1) = 1+ 2a1 + 3ā1 E2 (a1) = 3 + ā1

  48. Flow and Reparametrization E(a1,a2) = 2a1 + 5ā1+ 9a2 + 4ā2 + 2a1ā2 +ā1a2 Source (0) 9 2 1 a1 a2 2 5 4 Sink (1)

  49. Flow and Reparametrization E(a1,a2) = 2a1 + 5ā1+ 9a2 + 4ā2 + 2a1ā2 +ā1a2 Source (0) 9 2 2a1 + 5ā1 1 a1 a2 = 2(a1+ā1) + 3ā1 2 = 2 + 3ā1 5 4 Sink (1)

  50. Flow and Reparametrization E(a1,a2) = 2+ 3ā1+ 9a2 + 4ā2 + 2a1ā2 +ā1a2 Source (0) 9 0 2a1 + 5ā1 1 a1 a2 = 2(a1+ā1) + 3ā1 2 = 2 + 3ā1 3 4 Sink (1)

More Related