What Energy Functions Can be Minimized Using Graph Cuts? Shai Bagon Advanced Topics in Computer Vision June 2010.

Slides:



Advertisements
Similar presentations
MAP Estimation Algorithms in
Advertisements

POSE–CUT Simultaneous Segmentation and 3D Pose Estimation of Humans using Dynamic Graph Cuts Mathieu Bray Pushmeet Kohli Philip H.S. Torr Department of.
Mean-Field Theory and Its Applications In Computer Vision1 1.
Primal-dual Algorithm for Convex Markov Random Fields Vladimir Kolmogorov University College London GDR (Optimisation Discrète, Graph Cuts et Analyse d'Images)
O BJ C UT M. Pawan Kumar Philip Torr Andrew Zisserman UNIVERSITY OF OXFORD.
Lena Gorelick Joint work with Frank Schmidt and Yuri Boykov Rochester Institute of Technology, Center of Imaging Science January 2013 TexPoint fonts used.
Introduction to Markov Random Fields and Graph Cuts Simon Prince
Joint Optimisation for Object Class Segmentation and Dense Stereo Reconstruction Ľubor Ladický, Paul Sturgess, Christopher Russell, Sunando Sengupta, Yalin.
I Images as graphs Fully-connected graph – node for every pixel – link between every pair of pixels, p,q – similarity w ij for each link j w ij c Source:
The University of Ontario CS 4487/9687 Algorithms for Image Analysis Multi-Label Image Analysis Problems.
Graph-Based Image Segmentation
Graph-based image segmentation Václav Hlaváč Czech Technical University in Prague Faculty of Electrical Engineering Department of Cybernetics Prague, Czech.
Probabilistic Inference Lecture 1
Learning with Inference for Discrete Graphical Models Nikos Komodakis Pawan Kumar Nikos Paragios Ramin Zabih (presenter)
Pseudo-Bound Optimization for Binary Energies Presenter: Meng Tang Joint work with Ismail Ben AyedYuri Boykov 1 / 27.
GraphCut-based Optimisation for Computer Vision Ľubor Ladický.
1 Can this be generalized?  NP-hard for Potts model [K/BVZ 01]  Two main approaches 1. Exact solution [Ishikawa 03] Large graph, convex V (arbitrary.
Robust Higher Order Potentials For Enforcing Label Consistency
Schedule Introduction Models: small cliques and special potentials Tea break Inference: Relaxation techniques:
P 3 & Beyond Solving Energies with Higher Order Cliques Pushmeet Kohli Pawan Kumar Philip H. S. Torr Oxford Brookes University CVPR 2007.
2010/5/171 Overview of graph cuts. 2010/5/172 Outline Introduction S-t Graph cuts Extension to multi-label problems Compare simulated annealing and alpha-
Stereo & Iterative Graph-Cuts Alex Rav-Acha Vision Course Hebrew University.
Graph Cut based Inference with Co-occurrence Statistics Ľubor Ladický, Chris Russell, Pushmeet Kohli, Philip Torr.
Lecture 10: Stereo and Graph Cuts
Stereo Computation using Iterative Graph-Cuts
Relaxations and Moves for MAP Estimation in MRFs M. Pawan Kumar STANFORDSTANFORD Vladimir KolmogorovPhilip TorrDaphne Koller.
Measuring Uncertainty in Graph Cut Solutions Pushmeet Kohli Philip H.S. Torr Department of Computing Oxford Brookes University.
Graph-Cut Algorithm with Application to Computer Vision Presented by Yongsub Lim Applied Algorithm Laboratory.
Computer vision: models, learning and inference
Extensions of submodularity and their application in computer vision
Multiplicative Bounds for Metric Labeling M. Pawan Kumar École Centrale Paris École des Ponts ParisTech INRIA Saclay, Île-de-France Joint work with Phil.
Graph-based Segmentation
MRFs and Segmentation with Graph Cuts Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/31/15.
Michael Bleyer LVA Stereo Vision
Surface Stereo with Soft Segmentation Michael Bleyer 1, Carsten Rother 2, Pushmeet Kohli 2 1 Vienna University of Technology, Austria 2 Microsoft Research.
Minimizing Sparse Higher Order Energy Functions of Discrete Variables (CVPR’09) Namju Kwak Applied Algorithm Lab. Computer Science Department KAIST 1Namju.
MRFs and Segmentation with Graph Cuts Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/24/10.
Segmentation: MRFs and Graph Cuts Computer Vision CS 143, Brown James Hays 10/07/11 Many slides from Kristin Grauman and Derek Hoiem.
City University of Hong Kong 18 th Intl. Conf. Pattern Recognition Self-Validated and Spatially Coherent Clustering with NS-MRF and Graph Cuts Wei Feng.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
Planar Cycle Covering Graphs for inference in MRFS The Typhon Algorithm A New Variational Approach to Ground State Computation in Binary Planar Markov.
Interactive Graph Cuts for Optimal Boundary & Region Segmentation of Objects in N-D Images (Fri) Young Ki Baik, Computer Vision Lab.
Object Stereo- Joint Stereo Matching and Object Segmentation Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on Michael Bleyer Vienna.
Lena Gorelick joint work with O. Veksler I. Ben Ayed A. Delong Y. Boykov.
Probabilistic Inference Lecture 3 M. Pawan Kumar Slides available online
Discrete Optimization in Computer Vision M. Pawan Kumar Slides will be available online
Associative Hierarchical CRFs for Object Class Image Segmentation Ľubor Ladický 1 1 Oxford Brookes University 2 Microsoft Research Cambridge Based on the.
Discrete Optimization Lecture 3 – Part 1 M. Pawan Kumar Slides available online
Probabilistic Inference Lecture 5 M. Pawan Kumar Slides available online
Machine Learning – Lecture 15
Associative Hierarchical CRFs for Object Class Image Segmentation
O BJ C UT M. Pawan Kumar Philip Torr Andrew Zisserman UNIVERSITY OF OXFORD.
Presenter : Kuang-Jui Hsu Date : 2011/3/24(Thur.).
Tractable Higher Order Models in Computer Vision (Part II) Slides from Carsten Rother, Sebastian Nowozin, Pusohmeet Khli Microsoft Research Cambridge Presented.
Machine Learning – Lecture 15
Pseudo-Bound Optimization for Binary Energies Meng Tang 1 Ismail Ben Ayed 2 Yuri Boykov 1 1 University of Western Ontario, Canada 2 GE Healthcare Canada.
Pushmeet Kohli. E(X) E: {0,1} n → R 0 → fg 1 → bg Image (D) n = number of pixels [Boykov and Jolly ‘ 01] [Blake et al. ‘04] [Rother, Kolmogorov and.
CS654: Digital Image Analysis Lecture 28: Advanced topics in Image Segmentation Image courtesy: IEEE, IJCV.
A global approach Finding correspondence between a pair of epipolar lines for all pixels simultaneously Local method: no guarantee we will have one to.
Markov Random Fields in Vision
Segmentation with non-linear constraints on appearance, complexity, and geometry Yuri Boykov Western Univesity Andrew Delong Olga Veksler Lena Gorelick.
Image segmentation.
Energy minimization Another global approach to improve quality of correspondences Assumption: disparities vary (mostly) smoothly Minimize energy function:
MRFs and Segmentation with Graph Cuts Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/27/12.
Markov Random Fields Tomer Michaeli Graduate Course
Efficient Graph Cut Optimization for Full CRFs with Quantized Edges
Discrete Inference and Learning
Lecture 31: Graph-Based Image Segmentation
Graphical Models and Learning
“Traditional” image segmentation
Presentation transcript:

What Energy Functions Can be Minimized Using Graph Cuts? Shai Bagon Advanced Topics in Computer Vision June 2010

What is an Energy Function? E a number suggested solution For a given problem:Image Segmentation: Useful Energy function: 1.Good solution  Low energy 2.Tractable  Can be minimized

Families of Functions or Outline F 2 submodular Non submodular F 3 Beyond F 3

Foreground Selection Let y i – color of i th pixel x i {0,1} BG/FG labels (variables) Given BG/FG scribbles: Pr(x i |y i ) =How likely each pixel to be FG/BG Pr(x m |x n ) =Adjacent pixels should have same label F 2 energy: E(x)=∑ i E i (x i )+∑ ij E ij (x i,x j ) xmxm xnxn xixi yiyi

Submodular Known concept from set-functions: E(x) = ∑ i E i (x i ) + ∑ ij E ij (x i, x j ), x i {0,1} 1CD 0AB xjxixjxi 01 E ij (x i,x j ): What does it mean? B+C-A-D ≥ 0

How to Minimize? E(x) = ∑ i E i (x i ) + ∑ ij E ij (x i, x j ), x i {0,1} Local “beliefs”: Data term Prior knowledge: Smoothness term F 2 submodular

Graph Partitioning A weighted graph G=( V E w ) Special Nodes: s t s-t cut: Cost of a cut: Nice property: 1:1 mapping s-t cut ↔ {0,1} |V|-2 w V E w ij s t    TjSi TSCut, ),( VTSTS TtSsVTVS  ,,,, 

s t Graph Partitioning - Energy E(x) = ∑ i E i (x i ) + ∑ ij E ij (x i, x j ) Graph Partitioning i j E j (1) D-C B+C-A-D E i (0) 1CD 0AB xjxixjxi 01 E ij (x i,x j ) C-A 00 D-C B+C-A-D0 = A +++ C-A

s t Graph Partitioning - Energy E(x) = ∑ i E i (x i ) + ∑ ij E ij (x i, x j ) Graph Partitioning i j E j (1) B+C-A-D E i (0) C-A D-C st cut  binary assignment cut cost  energy of assignment min cut  Energy min. B=E ij (0,1)

Recap F 2 submodular: E(x) = ∑ i E i (x i ) + ∑ ij E ij (x i, x j ) E ij (1,0)+E ij (0,1)≥E ij (0,0)+E ij (1,1) Mapping from energy to graph partition Min Energy = computing min-cut Global optimum in poly time for submodular functions!

Next… Multi-label F 2 E(x)=∑ i E i (x i ) + ∑ ij E ij (x i,x j ) s.t. x i {1,…,L} –Fusion moves: solving binary sub-problems –Applications to stereo, stitching, segmentation… ● Current labeling suggested labeling “Alpha expansion” = Fusion Solve Binary problem: x i =0 x i =1

Stereo matching see Ground truth Pairwise MRF [Boykov et al. ‘01] slide by Carsten Rother, ICCV’09 Input:

Panoramic stitching slide by Carsten Rother, ICCV’09

Panoramic stitching slide by Pushmeet Kohli, ICCV’09

AutoCollage [Rother et. al. Siggraph ‘05 ]

Next… Multi-label F 2 E(x)=∑ i E i (x i ) + ∑ ij E ij (x i,x j ) s.t. x i {1,…,L} –Fusion moves: solving binary sub-problems –Applications to stereo, stitching, segmentation… Non-submodular Beyond pair-wise interactions: F 3

Merging Regions input image regions (Ncuts) “edge” prob. pipi “weak” edge “strong” edge p i – prob. of boundary being edge GOAL: Find labeling x i {0,1} that max: i j min: Taking -log

Merging Regions Adding and subtracting the same number

Merging Regions Solving for edges: Consistency constraints: No “dangling” edge J x1x1 x2x2 x3x3 EJEJ λ wiwi xixi No longer pair-wise: F 3

Minimization trick Freedman D., Turek MW, Graph cuts with many pixel interactions: theory and applications to shape modeling. Image Vision Computing 2010

Merging Regions The resulting energy: + Pair-wise - Non submodular!

Quadratic Pseudo-Boolean Optimization s i j t ij Kolmogorov V., Carsten R., Minimizing non-submodular functions with graph cuts – a review. PAMI ’ 07

+ All edges with positive capacities - No constraint Labeling rule: partial labeling s i j t ij Quadratic Pseudo-Boolean Optimization

Properties of partial labeling y: 1. Let z=FUSE(y,x)  E(z)≤E(x) 2. y is subset of optimal y* y is complete: 1. E submodular 2. Exists flipping (inference in trees) s i j t ij Quadratic Pseudo-Boolean Optimization

0????? rpqst 000?? 0010? rpqst rpqst QPBO: Probe Node p: 0 1 What can we say about variables? r -> is always 0 s -> is always equal to q t -> is 0 when q = 1 slide by Pushmeet Kohli, ICCV’09 QBPO - Probing

Probe nodes in an order until energy unchanged Simplified energy preserves global optimality and (sometimes) gives the global minimum slide by Pushmeet Kohli, ICCV’09 QBPO - Probing

Merging Regions Result using QPBO-P: Result regions (Ncuts)input image

Recap F 3 and more –Minimization trick Non submodular –QPBO approx. – partial labeling

Beyond F 3 … [Kohli et. al. CVPR ‘07, ‘08, PAMI ’08, IJCV ‘09]

Image Segmentation E(X) = ∑ c i x i + ∑ d ij |x i -x j | ii,j E: {0,1} n → R 0 → fg, 1 → bg n = number of pixels [Boykov and Jolly ‘ 01] [Blake et al. ‘04] [Rother et al.`04] Image Unary Cost Segmentation

P n Potts Potentials Patch Dictionary (Tree) C max  0 { 0 if x i = 0, i p C max otherwise h(X p ) = p [slide credits: Kohli]

P n Potts Potentials E(X) = ∑ c i x i + ∑ d ij |x i -x j | + ∑ h p (X p ) ii,j p p { 0 if x i = 0, i p C max otherwise h(X p ) = E: {0,1} n → R 0 → fg, 1 → bg n = number of pixels [slide credits: Kohli]

Image Segmentation E(X) = ∑ c i x i + ∑ d ij |x i -x j | + ∑ h p (X p ) ii,j ImagePairwise SegmentationFinal Segmentation p E: {0,1} n → R 0 → fg, 1 → bg n = number of pixels [slide credits: Kohli]

Application: Recognition and Segmentation from [Kohli et al. ‘08] Image Unaries only TextonBoost [Shotton et al. ‘06] Pairwise CRF only [Shotton et al. ‘06] P n Potts One super- pixelization another super- pixelization

Robust(soft) P n Potts model { 0 if x i = 0, i p f( ∑ x p ) otherwise h(x p ) = p p from [Kohli et al. ‘08] Robust P n PottsP n Potts

Application: Recognition and Segmentation From [Kohli et al. ‘08] Image Unaries only TextonBoost [Shotton et al. ‘06] Pairwise CRF only [Shotton et al. ‘06] P n Potts robust P n Potts (different f) One super- pixelization another super- pixelization

Same idea for surface-based stereo [Bleyer ‘10] One input image Ground truth depth Stereo with hard-segmentation Stereo with robust P n Potts This approach gets best result on Middlebury Teddy image-pair:

How is it done… H (X) = F ( ∑ x i ) Most general binary function: H (X) ∑ x i concave 0 The transformation is to a submodular pair-wise MRF, hence optimization globally optimal [slide credits: Kohli]

Higher order to Quadratic Start with P n Potts model: { 0 if all x i = 0 C 1 otherwise f(x) = x {0,1} n min f(x) min C 1 a + C 1 (1-a) ∑ x i x = x,a {0,1} Higher Order Function Quadratic Submodular Function ∑ x i = 0 a=0 f(x) = 0 ∑ x i > 0 a=1f(x) = C 1 [slide credits: Kohli]

Higher order to Quadratic min f(x) min C 1 a + C 1 (1-a) ∑ x i x = x,a {0,1} Higher Order FunctionQuadratic Submodular Function ∑xi∑xi 1 23 C1C1 C1∑xiC1∑xi [slide credits: Kohli]

Higher order to Quadratic min f(x) min C 1 a + C 1 (1-a) ∑ x i x = x,a {0,1} Higher Order Submodular Function Quadratic Submodular Function ∑xi∑xi 1 23 C1C1 C1∑xiC1∑xi a=1 a=0 Lower envelope of concave functions is concave [slide credits: Kohli]

Summary Submodular F 2 F 3 and beyond: minimization trick Non submodular –QPBO(P) Beyond F 3 – Robust HOP s i j t ij ∑xi∑xi a=1 a=0 f 2 (x) f 1 (x)