Graph-based Segmentation

Slides:



Advertisements
Similar presentations
Cutting Images: Graphs and Boundary Finding Computational Photography Derek Hoiem, University of Illinois 09/15/11 “The Double Secret”, Magritte.
Advertisements

Fitting a transformation: feature-based alignment Wed, Feb 23 Prof. Kristen Grauman UT-Austin.
Introduction to Markov Random Fields and Graph Cuts Simon Prince
Lecture 24: Segmentation CS6670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
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:
GrabCut Interactive Image (and Stereo) Segmentation Carsten Rother Vladimir Kolmogorov Andrew Blake Antonio Criminisi Geoffrey Cross [based on Siggraph.
GrabCut Interactive Foreground Extraction using Iterated Graph Cuts Carsten Rother Vladimir Kolmogorov Andrew Blake Microsoft Research Cambridge-UK.
GrabCut Interactive Foreground Extraction using Iterated Graph Cuts Carsten Rother Vladimir Kolmogorov Andrew Blake Microsoft Research Cambridge-UK.
Graph-Based Image Segmentation
Stephen J. Guy 1. Photomontage Photomontage GrabCut – Interactive Foreground Extraction 1.
Graph-based image segmentation Václav Hlaváč Czech Technical University in Prague Faculty of Electrical Engineering Department of Cybernetics Prague, Czech.
GrabCut Interactive Image (and Stereo) Segmentation Joon Jae Lee Keimyung University Welcome. I will present Grabcut – an Interactive tool for foreground.
CS 691 Computational Photography Instructor: Gianfranco Doretto Cutting Images.
Grouping and Segmentation Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/01/10.
Lecture 6 Image Segmentation
Image segmentation. The goals of segmentation Group together similar-looking pixels for efficiency of further processing “Bottom-up” process Unsupervised.
Segmentation. Terminology Segmentation, grouping, perceptual organization: gathering features that belong together Fitting: associating a model with observed.
Region Segmentation. Find sets of pixels, such that All pixels in region i satisfy some constraint of similarity.
Segmentation CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
Announcements Project 2 more signup slots questions Picture taking at end of class.
Today: Image Segmentation Image Segmentation Techniques Snakes Scissors Graph Cuts Mean Shift Wednesday (2/28) Texture analysis and synthesis Multiple.
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-
What Energy Functions Can be Minimized Using Graph Cuts? Shai Bagon Advanced Topics in Computer Vision June 2010.
Image Segmentation Today’s Readings Forsyth & Ponce, Chapter 14
Presentation By Michael Tao and Patrick Virtue. Agenda History of the problem Graph cut background Compute graph cut Extensions State of the art Continued.
Measuring Uncertainty in Graph Cut Solutions Pushmeet Kohli Philip H.S. Torr Department of Computing Oxford Brookes University.
Perceptual Organization: Segmentation and Optical Flow.
Segmentation and Clustering Today’s Readings Forsyth & Ponce, Chapter 7 (plus lots of optional references in the slides) From Sandlot ScienceSandlot Science.
Announcements vote for Project 3 artifacts Project 4 (due next Wed night) Questions? Late day policy: everything must be turned in by next Friday.
Announcements Project 3 questions Photos after class.
Image Segmentation Rob Atlas Nick Bridle Evan Radkoff.
Segmentation and Grouping Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/23/10.
Computer Vision James Hays, Brown
MRFs and Segmentation with Graph Cuts Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/31/15.
Cutting Images: Graphs and Boundary Finding Computational Photography Derek Hoiem, University of Illinois 09/14/10 “The Double Secret”, Magritte.
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.
Chapter 14: SEGMENTATION BY CLUSTERING 1. 2 Outline Introduction Human Vision & Gestalt Properties Applications – Background Subtraction – Shot Boundary.
Object Stereo- Joint Stereo Matching and Object Segmentation Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on Michael Bleyer Vienna.
CSE 185 Introduction to Computer Vision Pattern Recognition 2.
Lecture 19: Solving the Correspondence Problem with Graph Cuts CAP 5415 Fall 2006.
Associative Hierarchical CRFs for Object Class Image Segmentation
Gaussian Mixture Models and Expectation-Maximization Algorithm.
CS654: Digital Image Analysis Lecture 28: Advanced topics in Image Segmentation Image courtesy: IEEE, IJCV.
Object Recognition by Integrating Multiple Image Segmentations Caroline Pantofaru, Cordelia Schmid, Martial Hebert ECCV 2008 E.
A global approach Finding correspondence between a pair of epipolar lines for all pixels simultaneously Local method: no guarantee we will have one to.
Computational Photography lecture 8 – segmentation CS (future 572) Spring 2016 Prof. Alex Berg (Credits to many other folks on individual slides)
CS 2750: Machine Learning Clustering Prof. Adriana Kovashka University of Pittsburgh January 25, 2016.
Cutting Images: Graphs and Boundary Finding Computational Photography Derek Hoiem, University of Illinois 09/20/12 “The Double Secret”, Magritte.
Normalized Cuts and Image Segmentation Patrick Denis COSC 6121 York University Jianbo Shi and Jitendra Malik.
Image segmentation.
MRFs and Segmentation with Graph Cuts Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/27/12.
Course Introduction to Medical Imaging Segmentation 1 – Mean Shift and Graph-Cuts Guy Gilboa.
Image Segmentation Today’s Readings Szesliski Chapter 5
Cutting Images: Graphs and Boundary Finding
Segmentation by clustering: normalized cut
GrabCut Interactive Foreground Extraction using Iterated Graph Cuts Carsten Rother Vladimir Kolmogorov Andrew Blake Microsoft Research Cambridge-UK.
Fitting a transformation: Feature-based alignment May 2nd, 2017
Markov Random Fields and Segmentation with Graph Cuts
Lecture 31: Graph-Based Image Segmentation
Announcements Photos right now Project 3 questions
Digital Image Processing
Seam Carving Project 1a due at midnight tonight.
Image Segmentation CS 678 Spring 2018.
Segmentation (continued)
Announcements Project 4 questions Evaluations.
Announcements Project 4 out today (due Wed March 10)
Announcements Project 1 is out today help session at the end of class.
“Traditional” image segmentation
Presentation transcript:

Graph-based Segmentation 02/25/10 Graph-based Segmentation Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem

Last class Gestalt cues and principles of organization Mean-shift segmentation Good general-purpose segmentation method Generally useful clustering, tracking technique Watershed segmentation Good for hierarchical segmentation Use in combination with boundary prediction

Today’s class Treating the image as a graph Recap Normalized cuts segmentation MRFs Graph cuts segmentation Recap Go over HW2 instructions

Images as graphs Fully-connected graph node for every pixel wij c j Fully-connected graph node for every pixel link between every pair of pixels, p,q similarity wij for each link Source: Seitz

Similarity matrix Increasing sigma

Segmentation by Graph Cuts w A B C Break Graph into Segments Delete links that cross between segments Easiest to break links that have low cost (low similarity) similar pixels should be in the same segments dissimilar pixels should be in different segments Source: Seitz

Cuts in a graph B A Link Cut set of links whose removal makes a graph disconnected cost of a cut: One idea: Find minimum cut gives you a segmentation fast algorithms exist for doing this Source: Seitz

But min cut is not always the best cut...

Cuts in a graph a cut penalizes large segments B A Normalized Cut a cut penalizes large segments fix by normalizing for size of segments volume(A) = sum of costs of all edges that touch A Source: Seitz

Recursive normalized cuts Given an image or image sequence, set up a weighted graph: G=(V, E) Vertex for each pixel Edge weight for nearby pairs of pixels Solve for eigenvectors with the smallest eigenvalues: (D − W)y = λDy Use the eigenvector with the second smallest eigenvalue to bipartition the graph Note: this is an approximation 4. Recursively repartition the segmented parts if necessary http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf Details:

Normalized cuts results

Normalized cuts: Pro and con Pros Generic framework, can be used with many different features and affinity formulations Provides regular segments Cons Need to chose number of segments High storage requirement and time complexity Bias towards partitioning into equal segments Usage Use for oversegmentation when you want regular segments

Graph cuts segmentation

Markov Random Fields Node yi: pixel label Edge: constrained pairs Cost to assign a label to each pixel Cost to assign a pair of labels to connected pixels

Markov Random Fields Example: “label smoothing” grid Unary potential 0: -logP(yi = 0 ; data) 1: -logP(yi = 1 ; data) Pairwise Potential 0 1 0 0 K 1 K 0

Solving MRFs with graph cuts Source (Label 0) Cost to assign to 0 Cost to split nodes Cost to assign to 1 Sink (Label 1)

Solving MRFs with graph cuts Source (Label 0) Cost to assign to 0 Cost to split nodes Cost to assign to 1 Sink (Label 1)

Grab cuts and graph cuts Magic Wand (198?) Intelligent Scissors Mortensen and Barrett (1995) GrabCut User Input Result Basic idea is to combine the information which was used in the 2 well known tools: MW and IS. MS select a region of similar colour according to your input. Fat pen and the boundary snapps to high contrast edges. Grabcut combines it. And this allows us to simplify the user interface considerably by … Regions Boundary Regions & Boundary Source: Rother

Colour Model R R G G Gaussian Mixture Model (typically 5-8 components) Iterated graph cut Foreground & Background Foreground Color enbergy. Iterations have the effect of pulling them away; D is – log likelyhood of the GMM. Background G Background G Gaussian Mixture Model (typically 5-8 components) Source: Rother

Graph cuts Boykov and Jolly (2001) Foreground (source) Image Min Cut Cut: separating source and sink; Energy: collection of edges Min Cut: Global minimal enegry in polynomial time Optimization engine we use Graph Cuts. By now everybody should know what graph cut is. IN case you missed it here is a very brief introduction. To image. 3D view. First task to construct a graph. All pixels on a certain scanline. Just a few of them. Next step introduce artificial nodes. fgd and background. Edges – contrast. Boundary is quite likely between black and white. Min Cut - Minimum edge strength. Background (sink) Source: Rother

Graph cuts segmentation Define graph usually 4-connected or 8-connected Define unary potentials Color histogram or mixture of Gaussians for background and foreground Define pairwise potentials Apply graph cuts Return to 2, using current labels to compute foreground, background models

Moderately straightforward examples Moderately straightforward examples- after the user input automnatically … GrabCut completes automatically GrabCut – Interactive Foreground Extraction 10

Difficult Examples Camouflage & Low Contrast Fine structure Harder Case Initial Rectangle Initial Result You might wonder when does it fail. 4 cases. Low contrats – an edge not good visible GrabCut – Interactive Foreground Extraction 11

Using graph cuts for recognition TextonBoost (Shotton et al. 2009 IJCV)

Using graph cuts for recognition Unary Potentials Alpha Expansion Graph Cuts TextonBoost (Shotton et al. 2009 IJCV)

Limits of graph cuts Associative: edge potentials penalize different labels If not associative, can sometimes clip potentials Approximate for multilabel Alpha-expansion or alpha-beta swaps Must satisfy

Graph cuts: Pros and Cons Very fast inference Can incorporate recognition or high-level priors Applies to a wide range of problems (stereo, image labeling, recognition) Cons Not always applicable (associative only) Need unary terms (not used for generic segmentation) Use whenever applicable

Further reading and resources Normalized cuts and image segmentation (Shi and Malik) http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf N-cut implementation http://www.seas.upenn.edu/~timothee/software/ncut/ncut.html Graph cuts http://www.cs.cornell.edu/~rdz/graphcuts.html Classic paper: What Energy Functions can be Minimized via Graph Cuts? (Kolmogorov and Zabih, ECCV '02/PAMI '04)

Recap of Grouping and Fitting

Line detection and Hough transform Canny edge detector = smooth  derivative  thin  threshold  link Generalized Hough transform = points vote for shape parameters Straight line detector = canny + gradient orientations  orientation binning  linking  check for straightness

Robust fitting and registration Key algorithm RANSAC

Clustering Key algorithm Kmeans

EM and Mixture of Gaussians Tutorials: http://www.cs.duke.edu/courses/spring04/cps196.1/.../EM/tomasiEM.pdfhttp://www-clmc.usc.edu/~adsouza/notes/mix_gauss.pdf

Segmentation Mean-shift segmentation Watershed segmentation Flexible clustering method, good segmentation Watershed segmentation Hierarchical segmentation from soft boundaries Normalized cuts Produces regular regions Slow but good for oversegmentation MRFs with Graph Cut Incorporates foreground/background/object model and prefers to cut at image boundaries Good for interactive segmentation or recognition

Next section: Recognition How to recognize Specific object instances Faces Scenes Object categories Materials