Grouping and Segmentation

Slides:



Advertisements
Similar presentations
CSCE643: Computer Vision Mean-Shift Object Tracking Jinxiang Chai Many slides from Yaron Ukrainitz & Bernard Sarel & Robert Collins.
Advertisements

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.
EE 7730 Image Segmentation.
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.
Mean Shift Theory and Applications
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.
Image Segmentation Today’s Readings Forsyth & Ponce, Chapter 14
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.
Grouping and Segmentation Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/17/15.
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
CSE 185 Introduction to Computer Vision Pattern Recognition.
Mean Shift : A Robust Approach Toward Feature Space Analysis - Bayesian Background Modeling
Mean-shift and its application for object tracking
1 Mean shift and feature selection ECE 738 course project Zhaozheng Yin Spring 2005 Note: Figures and ideas are copyrighted by original authors.
Mean Shift Theory and Applications Reporter: Zhongping Ji.
Region Segmentation Readings: Chapter 10: 10.1 Additional Materials Provided K-means Clustering (text) EM Clustering (paper) Graph Partitioning (text)
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.
7.1. Mean Shift Segmentation Idea of mean shift:
CS 558 C OMPUTER V ISION Lecture VI: Segmentation and Grouping Slides adapted from S. Lazebnik.
CSE 185 Introduction to Computer Vision Pattern Recognition 2.
EECS 274 Computer Vision Segmentation by Clustering II.
CS654: Digital Image Analysis Lecture 30: Clustering based Segmentation Slides are adapted from:
Digital Image Processing
Real-Time Tracking with Mean Shift Presented by: Qiuhua Liu May 6, 2005.
CSSE463: Image Recognition Day 23 Midterm behind us… Midterm behind us… Foundations of Image Recognition completed! Foundations of Image Recognition completed!
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.
Image Segmentation Shengnan Wang
Image Segmentation Superpixel methods Speaker: Hsuan-Yi Ko.
Mean Shift ; Theory and Applications Presented by: Reza Hemati دی 89 December گروه بینایی ماشین و پردازش تصویر Machine Vision and Image Processing.
Object Recognition by Integrating Multiple Image Segmentations Caroline Pantofaru, Cordelia Schmid, Martial Hebert ECCV 2008 E.
Hidden Variables, the EM Algorithm, and Mixtures of Gaussians Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/22/11.
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.
Finding Boundaries Computer Vision CS 143, Brown James Hays 09/28/11 Many slides from Lana Lazebnik, Steve Seitz, David Forsyth, David Lowe, Fei-Fei Li,
Segmentation slides adopted from Svetlana Lazebnik.
Course Introduction to Medical Imaging Segmentation 1 – Mean Shift and Graph-Cuts Guy Gilboa.
Photo: CMU Machine Learning Department Protests G20
CSSE463: Image Recognition Day 21
Segmentation by clustering: mean shift
Lecture: Clustering and Segmentation
Lecture: k-means & mean-shift clustering
A segmentation and tracking algorithm
Segmentation Computer Vision Spring 2018, Lecture 27
CS 2750: Machine Learning Clustering
CSSE463: Image Recognition Day 23
Seam Carving Project 1a due at midnight tonight.
Image Segmentation CS 678 Spring 2018.
15 February 2019 Welcome to a class with some curious content!
Prof. Adriana Kovashka University of Pittsburgh September 6, 2018
CSSE463: Image Recognition Day 23
Mean Shift Theory and Applications
Announcements Project 1 is out today help session at the end of class.
CSSE463: Image Recognition Day 23
Image Segmentation Samuel Cheng
Presentation transcript:

Grouping and Segmentation 03/12/12 Grouping and Segmentation Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem

Announcements HW 3: due today HW 4: out soon Graded by Tues after spring break HW 4: out soon Mean-shift segmentation EM problem for dealing with bad annotators Graph cuts segmentation

Today’s class Segmentation and grouping Gestalt cues By clustering (mean-shift) By boundaries (watershed)

Gestalt grouping

Gestalt psychology or gestaltism German: Gestalt - "form" or "whole” Berlin School, early 20th century Kurt Koffka, Max Wertheimer, and Wolfgang Köhler View of brain: whole is more than the sum of its parts holistic parallel analog self-organizing tendencies Slide from S. Saverese

Gestaltism The Muller-Lyer illusion The famous Muller-Lyer illusion; the point is that the horizontal bar has properties that come only from its membership in a group (it looks shorter in the lower picture, but is actually the same size) and that these properties can’t be discounted--- you can’t look at this figure and ignore the arrowheads and thereby make the two bars seem to be the same size.

We perceive the interpretation, not the senses In one experiment, children from rural Zambia were less susceptible to the illusion.

Principles of perceptual organization Some criteria that tend to cause tokens to be grouped. From Steve Lehar: The Constructive Aspect of Visual Perception

Principles of perceptual organization More such

Gestaltists do not believe in coincidence

Emergence

Grouping by invisible completion From Steve Lehar: The Constructive Aspect of Visual Perception

Grouping involves global interpretation From Steve Lehar: The Constructive Aspect of Visual Perception

Grouping involves global interpretation From Steve Lehar: The Constructive Aspect of Visual Perception

Gestalt cues Good intuition and basic principles for grouping Basis for many ideas in segmentation and occlusion reasoning Some (e.g., symmetry) are difficult to implement in practice

Image segmentation Goal: Group pixels into meaningful or perceptually similar regions

Segmentation for feature support 50x50 Patch 50x50 Patch

Segmentation for efficiency [Felzenszwalb and Huttenlocher 2004] [Shi and Malik 2001] [Hoiem et al. 2005, Mori 2005]

Segmentation as a result Rother et al. 2004

Types of segmentations Oversegmentation Undersegmentation Multiple Segmentations

Major processes for segmentation Bottom-up: group tokens with similar features Top-down: group tokens that likely belong to the same object [Levin and Weiss 2006]

Segmentation using clustering Kmeans Mean-shift

Feature Space Source: K. Grauman

K-means clustering using intensity alone and color alone Image Clusters on intensity Clusters on color I gave each pixel the mean intensity or mean color of its cluster --- this is basically just vector quantizing the image intensities/colors. Notice that there is no requirement that clusters be spatially localized and they’re not.

K-Means pros and cons Pros Cons Usage Simple and fast Easy to implement Cons Need to choose K Sensitive to outliers Usage Rarely used for pixel segmentation

Mean shift segmentation D. Comaniciu and P. Meer, Mean Shift: A Robust Approach toward Feature Space Analysis, PAMI 2002. Versatile technique for clustering-based segmentation

Mean shift algorithm Try to find modes of this non-parametric density

Kernel density estimation Estimated density Data (1-D)

Kernel density estimation Kernel density estimation function Gaussian kernel

Mean shift Region of interest Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean shift Region of interest Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean shift Region of interest Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean shift Region of interest Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean shift Region of interest Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean shift Region of interest Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean shift Region of interest Center of mass Slide by Y. Ukrainitz & B. Sarel

Computing the Mean Shift Simple Mean Shift procedure: Compute mean shift vector Translate the Kernel window by m(x) Slide by Y. Ukrainitz & B. Sarel

Real Modality Analysis

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

Attraction basin

Mean shift clustering The mean shift algorithm seeks modes of the given set of points Choose kernel and bandwidth For each point: Center a window on that point Compute the mean of the data in the search window Center the search window at the new mean location Repeat (b,c) until convergence Assign points that lead to nearby modes to the same cluster

Segmentation by Mean Shift Compute features for each pixel (color, gradients, texture, etc); also store each pixel’s position Set kernel size for features Kf and position Ks Initialize windows at individual pixel locations Perform mean shift for each window until convergence Merge modes that are within width of Kf and Ks

Mean shift segmentation results http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html

http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html

Mean-shift: other issues Speedups Binned estimation – replace points within some “bin” by point at center with mass Fast search of neighbors – e.g., k-d tree or approximate NN Update all windows in each iteration (faster convergence) Other tricks Use kNN to determine window sizes adaptively Lots of theoretical support D. Comaniciu and P. Meer, Mean Shift: A Robust Approach toward Feature Space Analysis, PAMI 2002.

Doing mean-shift for HW 4 Goal is to understand the basics of how mean-shift works Just get something working that has the right behavior qualitatively Don’t worry about speed Simplifications Work with very small images (120x80) Use a uniform kernel (compute the mean of color, position within some neighborhood given by Kf and Ks) Can use a heuristic for merging similar modes

Mean shift pros and cons Good general-purpose segmentation Flexible in number and shape of regions Robust to outliers Cons Have to choose kernel size in advance Not suitable for high-dimensional features When to use it Oversegmentation Multiple segmentations Tracking, clustering, filtering applications D. Comaniciu, V. Ramesh, P. Meer: Real-Time Tracking of Non-Rigid Objects using Mean Shift, Best Paper Award, IEEE Conf. Computer Vision and Pattern Recognition (CVPR'00), Hilton Head Island, South Carolina, Vol. 2, 142-149, 2000 

Watershed algorithm

Watershed segmentation Watershed boundaries Image Gradient

Meyer’s watershed segmentation Choose local minima as region seeds Add neighbors to priority queue, sorted by value Take top priority pixel from queue If all labeled neighbors have same label, assign that label to pixel Add all non-marked neighbors to queue Repeat step 3 until finished (all remaining pixels in queue are on the boundary) Matlab: seg = watershed(bnd_im) Meyer 1991

Simple trick Use Gaussian or median filter to reduce number of regions

Watershed usage Use as a starting point for hierarchical segmentation Ultrametric contour map (Arbelaez 2006) Works with any soft boundaries Pb (w/o non-max suppression) Canny (w/o non-max suppression) Etc.

Watershed pros and cons Fast (< 1 sec for 512x512 image) Preserves boundaries Cons Only as good as the soft boundaries Not easy to get variety of regions for multiple segmentations Usage Preferred algorithm for hierarchical segmentation

Choices in segmentation algorithms Oversegmentation Watershed + Pb  my favorite Felzenszwalb and Huttenlocher 2004  my favorite http://www.cs.brown.edu/~pff/segment/ Turbopixels Mean-shift Larger regions Hierarchical segmentation (e.g., from Pb)  my favorite Normalized cuts Seed + graph cuts (discussed later)

Felzenszwalb and Huttenlocher: Graph-Based Segmentation http://www.cs.brown.edu/~pff/segment/ + Good for thin regions + Fast + Easy to control coarseness of segmentations + Can include both large and small regions - Often creates regions with strange shapes - Sometimes makes very large errors

Turbo Pixels: Levinstein et al. 2009 http://www.cs.toronto.edu/~kyros/pubs/09.pami.turbopixels.pdf Tries to preserve boundaries like watershed but to produce more regular regions

Things to remember Gestalt cues and principles of organization Uses of segmentation Efficiency Better features Want the segmented object 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

Further reading Contours to regions (watershed): Arbelaez et al. 2009 Nicely written mean-shift explanation (with math) http://saravananthirumuruganathan.wordpress.com/2010/04/01/introduction-to-mean-shift-algorithm/ Includes .m code for mean-shift clustering --- feel free to look at it but your code for segmentation will be different Mean-shift paper by Comaniciu and Meer http://www.caip.rutgers.edu/~comanici/Papers/MsRobustApproach.pdf Adaptive mean shift in higher dimensions http://mis.hevra.haifa.ac.il/~ishimshoni/papers/chap9.pdf Contours to regions (watershed): Arbelaez et al. 2009 http://www.eecs.berkeley.edu/~arbelaez/publications/Arbelaez_Maire_Fowlkes_Malik_CVPR2009.pdf

Next class: EM algorithm Make sure to bring something to take notes (will include a long derivation)