CS 558 C OMPUTER V ISION Lecture VI: Segmentation and Grouping Slides adapted from S. Lazebnik.

Slides:



Advertisements
Similar presentations
Department of Computer Engineering
Advertisements

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:
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.
Algorithms & Applications in Computer Vision Lihi Zelnik-Manor Lecture 11: Structure from Motion.
Mean Shift A Robust Approach to Feature Space Analysis Kalyan Sunkavalli 04/29/2008 ES251R.
Segmentation. Terminology Segmentation, grouping, perceptual organization: gathering features that belong together Fitting: associating a model with observed.
Normalized Cuts and Image Segmentation Jianbo Shi and Jitendra Malik, Presented by: Alireza Tavakkoli.
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.
Segmentation Divide the image into segments. Each segment:
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.
Segmentation Kyongil Yoon. Segmentation Obtain a compact representation of what is helpful (in the image) No comprehensive theory of segmentation Human.
Segmentation Graph-Theoretic Clustering.
Image Segmentation A Graph Theoretic Approach. Factors for Visual Grouping Similarity (gray level difference) Similarity (gray level difference) Proximity.
Perceptual Organization: Segmentation and Optical Flow.
Grouping and Segmentation Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/17/15.
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.
Computer Vision - A Modern Approach Set: Segmentation Slides by D.A. Forsyth Segmentation and Grouping Motivation: not information is evidence Obtain a.
Graph-based Segmentation
~5,617,000 population in each state
Image Segmentation Image segmentation is the operation of partitioning an image into a collection of connected sets of pixels. 1. into regions, which usually.
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
Mean-shift and its application for object tracking
CSSE463: Image Recognition Day 34 This week This week Today: Today: Graph-theoretic approach to segmentation Graph-theoretic approach to segmentation Tuesday:
Segmentation using eigenvectors Papers: “Normalized Cuts and Image Segmentation”. Jianbo Shi and Jitendra Malik, IEEE, 2000 “Segmentation using eigenvectors:
Region Segmentation Readings: Chapter 10: 10.1 Additional Materials Provided K-means Clustering (text) EM Clustering (paper) Graph Partitioning (text)
Segmentation Course web page: vision.cis.udel.edu/~cv May 7, 2003  Lecture 31.
Segmentation slides adopted from Svetlana Lazebnik.
Chapter 14: SEGMENTATION BY CLUSTERING 1. 2 Outline Introduction Human Vision & Gestalt Properties Applications – Background Subtraction – Shot Boundary.
CSE 185 Introduction to Computer Vision Pattern Recognition 2.
EECS 274 Computer Vision Segmentation by Clustering II.
Grouping and Segmentation
CS654: Digital Image Analysis Lecture 30: Clustering based Segmentation Slides are adapted from:
Digital Image Processing
Segmentation & Grouping Tuesday, Sept 23 Kristen Grauman UT-Austin.
Perceptual and Sensory Augmented Computing Computer Vision WS 11/12 Computer Vision – Lecture 6 Segmentation and Grouping Bastian Leibe RWTH.
CS654: Digital Image Analysis Lecture 28: Advanced topics in Image Segmentation Image courtesy: IEEE, IJCV.
 In the previews parts we have seen some kind of segmentation method.  In this lecture we will see graph cut, which is a another segmentation method.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP10 Advanced Segmentation Miguel Tavares.
Lecture 30: Segmentation CS4670 / 5670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
CS 2750: Machine Learning Clustering Prof. Adriana Kovashka University of Pittsburgh January 25, 2016.
Normalized Cuts and Image Segmentation Patrick Denis COSC 6121 York University Jianbo Shi and Jitendra Malik.
Image segmentation.
Segmentation slides adopted from Svetlana Lazebnik.
Course Introduction to Medical Imaging Segmentation 1 – Mean Shift and Graph-Cuts Guy Gilboa.
K-Means Segmentation.
Miguel Tavares Coimbra
Segmentation by clustering: normalized cut
Exercise class 13 : Image Segmentation
Region Segmentation Readings: Chapter 10: 10
CSSE463: Image Recognition Day 34
Segmentation by clustering: mean shift
Lecture: k-means & mean-shift clustering
Segmentation Computer Vision Spring 2018, Lecture 27
CS 2750: Machine Learning Clustering
Segmentation Graph-Theoretic Clustering.
Digital Image Processing
Image Segmentation CS 678 Spring 2018.
Spectral Clustering Eric Xing Lecture 8, August 13, 2010
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.
CSSE463: Image Recognition Day 34
“Traditional” image segmentation
Presentation transcript:

CS 558 C OMPUTER V ISION Lecture VI: Segmentation and Grouping Slides adapted from S. Lazebnik

O UTLINE Goals of segmentation Why should we care about segmentation? Segmentation as clustering Segmentation as graph partitioning Active contour, level-set and others

O UTLINE Goals of segmentation Why should we care about segmentation? Segmentation as clustering Segmentation as graph partitioning Active contour, level-set and others

T HE GOALS OF SEGMENTATION Group together similar-looking pixels for efficiency of further processing “Bottom-up” process Unsupervised X. Ren and J. Malik. Learning a classification model for segmentation. ICCV 2003.Learning a classification model for segmentation. “superpixels”

T HE GOALS OF SEGMENTATION Separate image into coherent “objects” “Bottom-up” or “top-down” process? Supervised or unsupervised? Berkeley segmentation database: image human segmentation

O UTLINE Goals of segmentation Why should we care about segmentation? Segmentation as clustering Segmentation as graph partitioning Active contour, level-set and others

I NSPIRATION FROM PSYCHOLOGY The Gestalt school: Grouping is key to visual perception The Muller-Lyer illusion

T HE G ESTALT SCHOOL Elements in a collection can have properties that result from relationships “The whole is greater than the sum of its parts” subjective contours occlusion familiar configuration

E MERGENCE

A TEST How do you describe this image?

A TEST How do you describe this image?

G ESTALT FACTORS

G ROUPING PHENOMENA IN REAL LIFE Forsyth & Ponce, Figure 14.7

G ROUPING PHENOMENA IN REAL LIFE Forsyth & Ponce, Figure 14.7

G ESTALT FACTORS These factors make intuitive sense, but are very difficult to translate into algorithms!

O UTLINE Goals of segmentation Why should we care about segmentation? Segmentation as clustering Segmentation as graph partitioning Active contour, level-set and others

S EGMENTATION AS CLUSTERING Source: K. Grauman

Image Intensity-based clustersColor-based clusters S EGMENTATION AS CLUSTERING K-means clustering based on intensity or color is essentially vector quantization of the image attributes Clusters don’t have to be spatially coherent

S EGMENTATION AS CLUSTERING Source: K. Grauman

S EGMENTATION AS CLUSTERING Clustering based on (r,g,b,x,y) values enforces more spatial coherence

K-M EANS FOR SEGMENTATION Pros Very simple method Converges to a local minimum of the error function Cons Memory-intensive Need to pick K Sensitive to initialization Sensitive to outliers Only finds “spherical” clusters

M EAN SHIFT CLUSTERING AND SEGMENTATION An advanced and versatile technique for clustering-based segmentation D. Comaniciu and P. Meer, Mean Shift: A Robust Approach toward Feature Space Analysis, PAMI 2002.Mean Shift: A Robust Approach toward Feature Space Analysis

M EAN SHIFT ALGORITHM The mean shift algorithm seeks modes or local maxima of density in the feature space image Feature space (L*u*v* color values)

Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Search window Center of mass Slide by Y. Ukrainitz & B. Sarel

M EAN SHIFT CLUSTERING Cluster: all data points in the attraction basin of a mode Attraction basin: the region for which all trajectories lead to the same mode Slide by Y. Ukrainitz & B. Sarel

Find features (color, gradients, texture, etc) Initialize windows at individual feature points Perform mean shift for each window until convergence Merge windows that end up near the same “peak” or mode M EAN SHIFT CLUSTERING / SEGMENTATION

M EAN SHIFT SEGMENTATION RESULTS

M ORE RESULTS

M EAN SHIFT PROS AND CONS Pros Does not assume spherical clusters Just a single parameter (window size) Finds variable number of modes Robust to outliers Cons Output depends on window size Computationally expensive Does not scale well with dimensions of feature spaces

O UTLINE Goals of segmentation Why should we care about segmentation? Segmentation as clustering Segmentation as graph partitioning Active contour, level-set and others

I MAGES AS GRAPHS Node for every pixel Edge between every pair of pixels (or every pair of “sufficiently close” pixels) Each edge is weighted by the affinity or similarity of the two nodes w ij i j Source: S. Seitz

S EGMENTATION BY GRAPH PARTITIONING Break Graph into Segments Delete links that cross between segments Easiest to break links that have low affinity similar pixels should be in the same segments dissimilar pixels should be in different segments ABC Source: S. Seitz w ij i j

M EASURING AFFINITY Suppose we represent each pixel by a feature vector x, and define a distance function appropriate for this feature representation Then we can convert the distance between two feature vectors into an affinity with the help of a generalized Gaussian kernel:

S CALE AFFECTS AFFINITY Small σ: group only nearby points Large σ: group far-away points

G RAPH CUT Set of edges whose removal makes a graph disconnected Cost of a cut: sum of weights of cut edges A graph cut gives us a segmentation What is a “good” graph cut and how do we find one? A B Source: S. Seitz

M INIMUM CUT We can do segmentation by finding the minimum cut in a graph Efficient algorithms exist for doing this Minimum cut example

M INIMUM CUT We can do segmentation by finding the minimum cut in a graph Efficient algorithms exist for doing this Minimum cut example

N ORMALIZED CUT Drawback: minimum cut tends to cut off very small, isolated components Ideal Cut Cuts with lesser weight than the ideal cut * Slide from Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Drawback: minimum cut tends to cut off very small, isolated components This can be fixed by normalizing the cut by the weight of all the edges incident to the segment The normalized cut cost is: N ORMALIZED CUT w(A, B) = sum of weights of all edges between A and B J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000Normalized cuts and image segmentation.

N ORMALIZED CUT Let W be the adjacency matrix of the graph Let D be the diagonal matrix with diagonal entries D ( i, i ) = Σ j W ( i, j ) Then the normalized cut cost can be written as where y is an indicator vector whose value should be 1 in the i th position if the i th feature point belongs to A and a negative constant otherwise J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000Normalized cuts and image segmentation.

Finding the exact minimum of the normalized cut cost is NP-complete, but if we relax y to take on arbitrary values, then we can minimize the relaxed cost by solving the generalized eigenvalue problem ( D − W ) y = λDy. The solution y is given by the generalized eigenvector corresponding to the second smallest eigenvalue (the first smallest eigenvalue is 0, and the first eigenvector is all constant and hence useless to partitioning). Intutitively, the i th entry of y can be viewed as a “soft” indication of the component membership of the i th point Can use 0 or median value of all entries as the splitting point (threshold), or find the threshold that minimizes the Ncut cost. N ORMALIZED CUT

N ORMALIZED CUT ALGORITHM 1. Represent the input image as a weighted graph G = ( V, E ), compute the weight of each edge, and summarize the information in D and W. 2. Solve ( D − W ) y = λDy for the eigenvector with the second smallest eigenvalue. 3. Use the entries of this eigenvector to bipartition the graph. To find more than two clusters: recursively bipartition the graph; run K-means clustering on the values of multiple ( e.g., K) eigenvectors.

E XAMPLE RESULT

C HALLENGE How to segment images that are a “mosaic of textures”?

U SING TEXTURE FEATURES FOR SEGMENTATION Convolve images with a bank of filters J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation"

U SING TEXTURE FEATURES FOR SEGMENTATION Convolve the image with a bank of filters Find textons by clustering vectors of filter-bank outputs J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation" Texton mapImage

U SING TEXTURE FEATURES FOR SEGMENTATION Convolve the image with a bank of filters Find textons by clustering vectors of filter-bank outputs The final texture feature is a texton histogram computed over image windows at some “local scale” J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation"

P ITFALL OF TEXTURE FEATURES Possible solution: check for “intervening contours” when computing connection weights J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation"

E XAMPLE RESULTS

R ESULTS : B ERKELEY S EGMENTATION E NGINE

Pros Generic framework, can be used with many different features and affinity formulations Cons High storage requirement and time complexity Bias towards partitioning into equal segments N ORMALIZED CUTS : P RO AND CON

O UTLINE Goals of segmentation Why should we care about segmentation? Segmentation as clustering Segmentation as graph partitioning Active contour, level-set and others

A CTIVE CONTOUR AND LEVEL SET Active contour method A level-set function

A UTOMATIC O BJECT OF INTEREST EXTRACTION Gang Hua, Zicheng Liu, Zhengyou Zhang and Ying Wu, "Iterative local-global energy mini-mization for automatic extraction of object of interest", IEEE Trans. on Pattern Recognition and Machine Intelligence (PAMI), Vol.28, No.10, pp , October, 2006.Iterative local-global energy mini-mization for automatic extraction of object of interest

A BUSINESS CARD SCANNING SYSTEM Automatic object of interests (OOI) extraction It is a general formulation for OOI extraction Business card scanning (Live demo) Input Segmentation Curve Simplification Quadrangle fitting Rectangle rectification Image enhancement Output 2 Output 1 Gang Hua, Zicheng Liu, Zhengyou Zhang and Ying Wu, "Automatic Business Card Scanning with a Camera", in Proc. IEEE conf. on Image Processing (ICIP'2006), pp , Atlanta, GA, Octobor, 2006.Automatic Business Card Scanning with a Camera

T OP - DOWN SEGMENTATION E. Borenstein and S. Ullman, “Class-specific, top-down segmentation,” ECCV 2002“Class-specific, top-down segmentation,” A. Levin and Y. Weiss, “Learning to Combine Bottom-Up and Top-Down Segmentation,” ECCV 2006.“Learning to Combine Bottom-Up and Top-Down Segmentation,”

T OP - DOWN SEGMENTATION E. Borenstein and S. Ullman, “Class-specific, top-down segmentation,” ECCV 2002“Class-specific, top-down segmentation,” A. Levin and Y. Weiss, “Learning to Combine Bottom-Up and Top-Down Segmentation,” ECCV 2006.“Learning to Combine Bottom-Up and Top-Down Segmentation,” Normalized cuts Top-down segmentation