Segmentation by clustering: mean shift

Slides:



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

Human-Computer Interaction Human-Computer Interaction Segmentation Hanyang University Jong-Il Park.
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.
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.
Segmentation by Clustering Reading: Chapter 14 (skip 14.5) Data reduction - obtain a compact representation for interesting image data in terms of a set.
1 Ecological Statistics and Perceptual Organization Charless Fowlkes work with David Martin and Jitendra Malik at University of California at Berkeley.
Grouping and Segmentation Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/17/15.
Computer Vision Segmentation Marc Pollefeys COMP 256 Some slides and illustrations from D. Forsyth, T. Darrel,...
Computer Vision - A Modern Approach Set: Segmentation Slides by D.A. Forsyth Segmentation and Grouping Motivation: not information is evidence Obtain a.
~5,617,000 population in each state
Segmentation and Grouping Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/23/10.
Methods in Medical Image Analysis Statistics of Pattern Recognition: Classification and Clustering Some content provided by Milos Hauskrecht, University.
Computer Vision James Hays, Brown
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.
CS 558 C OMPUTER V ISION Lecture VI: Segmentation and Grouping Slides adapted from S. 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
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!
Perceptual and Sensory Augmented Computing Computer Vision WS 11/12 Computer Vision – Lecture 6 Segmentation and Grouping Bastian Leibe RWTH.
Image Segmentation Shengnan Wang
Mean Shift ; Theory and Applications Presented by: Reza Hemati دی 89 December گروه بینایی ماشین و پردازش تصویر Machine Vision and Image Processing.
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.
Segmentation slides adopted from Svetlana Lazebnik.
Course Introduction to Medical Imaging Segmentation 1 – Mean Shift and Graph-Cuts Guy Gilboa.
Edge Detection Images and slides from: James Hayes, Brown University, Computer Vision course Svetlana Lazebnik, University of North Carolina at Chapel.
K-Means Segmentation.
Segmentation by fitting a model: Hough transform and least squares
Miguel Tavares Coimbra
Segmentation by clustering: normalized cut
University of Ioannina
CSSE463: Image Recognition Day 21
University of Ioannina
Lecture: Clustering and Segmentation
Dr.safeyya Adeeb Alchalabi
Mean Shift Segmentation
Lecture: k-means & mean-shift clustering
A segmentation and tracking algorithm
Segmentation Computer Vision Spring 2018, Lecture 27
Segmentation and Grouping
CS 2750: Machine Learning Clustering
Perceiving and Recognizing Objects
CSSE463: Image Recognition Day 23
Segmentation Lecture 04 Computer Vision
Emel Doğrusöz Esra Ataer Muhammet Baştan Tolga Can
Image Segmentation CS 678 Spring 2018.
Segmentation by fitting a model: robust estimators and RANSAC
CSSE463: Image Recognition Day 23
Announcements Project 4 questions Evaluations.
CSSE463: Image Recognition Day 23
Mean Shift Theory and Applications
CSSE463: Image Recognition Day 23
Image Segmentation Samuel Cheng
Presentation transcript:

Segmentation by clustering: mean shift T-11 Computer Vision University of Ioannina Christophoros Nikou Images and slides from: James Hayes, Brown University, Computer Vision course D. Forsyth and J. Ponce. Computer Vision: A Modern Approach, Prentice Hall, 2003. Computer Vision course by Svetlana Lazebnik, University of North Carolina at Chapel Hill. Computer Vision course by Kristen Grauman, University of Texas at Austin.

Segmentation by Clustering Grouping and fitting The Gestalt school of psychology Mean shift Graph-based methods Spectral methods Segmentation as a first step to image understanding.

Segmentation and Grouping Image analysis and computer vision are inference problems We have measurements and a model. We would like to know what caused the measurement. Obtain a compact representation from an image/motion sequence/set of tokens. Purely local pixel grouping (color) Global relations between sets of pixels (e.g. all items lying on a straight line.

Segmentation and Grouping Grouping (or clustering) collect together tokens (pixels, points surface elements…) that “belong together”. Fitting associate a model with tokens. issues which model? which token goes to which element? how many elements in the model?

Perceptual Organization Why do these tokens belong together? The human visual system performs surprisingly well it recognizes the spheres How could we make a computer system “see” as a human? why does it have to assemble the tokens?

Basic ideas of grouping in humans Figure-ground discrimination grouping can be seen in terms of allocating some elements to a figure, some to ground. impoverished theory The Gestalt school Gestalt: shape, whole or a group grouping is the key to human visual perception. A more complicated mechanism than figure/ground must explain visual perception

The Gestalt School Figure-ground discrimination is a relatively poor model White circle on a black background? A black rectangle with a hole on it?

The Gestalt School Psychologists identified series of factors that predispose sets of elements to be grouped in the human visual system. “I stand at the window and see a house, trees, sky. Theoretically, I might say there were 327 brightnesses and nuances of colour. Do I have “327”? No, I have house, sky and trees.” Max Wertheimer (1880-1943). Untersuchungen zur Lehre von der Gestalt. Psychologische Forschung, Vol. 4, pp. 301-350, 1923.

The Gestalt School The Muller-Lyer illusion: You can’t look at this figure and ignore (“group”) the arrowheads.

The Gestalt School Subjective contours Scattered tokens? Occlusion?

The Gestalt 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

The Gestalt School

Gestalt factors Intuitive factors leading to grouping are very difficult to translate into algorithms.

Gestalt factors in natural images Similarity

Gestalt factors in natural images Symmetry

Gestalt factors in natural images Common fate

Gestalt factors in natural images Proximity

Gestalt factors What can you see ?

Gestalt factors The visual system is helped by the evidence that the tokens are separated for a reason: occlusion.

Gestalt factors What can you see ?

Continuity through occlusion (is it a cube?) Gestalt factors Continuity through occlusion (is it a cube?)

Gestalt factors Elevator buttons at Computer Science building, U.C. at Berkeley.

Gestalt factors Proximity cue has been disambiguated.

Gestalt factors - conclusion Even psychologists argued which factors are more dominant than the others. Today, Gestalt factors are important but they should be considered as consequences of a more general grouping mechanism and not as the mechanism itself. Which is this mechanism? We cannot answer yet.

Segmentation by Mean Shift An advanced and versatile technique for clustering-based segmentation. http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html D. Comaniciu and P. Meer, Mean Shift: A Robust Approach toward Feature Space Analysis, IEEE Trans. on Pattern Analysis and Machine Intelligence, 2002.

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

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

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

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

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

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

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

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

Mean shift algorithm 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

Mean Shift Fundamentals Estimate the density at a point x from a number of sample data points x1…xn Epanechnikov Kernel Uniform Kernel Normal Kernel

Mean Shift Fundamentals Give up estimating the PDF ! Estimate ONLY the gradient Using the Kernel form: We get : Size of window

Mean Shift Fundamentals

Mean Shift Fundamentals Density estimation with another kernel! Simple Mean Shift procedure: Compute mean shift vector Translate the Kernel window to the weighted average

Mean shift clustering/segmentation

Mean shift clustering/segmentation 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.

Mean shift clustering/segmentation Color distances are not the same as position distances Use different kernels

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

Mean shift segmentation results

Mean shift segmentation results

Mean shift pros and cons 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 dimension of feature space.

Relaxation labeling Probabilistic method. Weights are assigned to pixels representing the probability to belong to a given class. The weights are updated until stability is obtained. Convergence to probability 1 is not guaranteed for each pixel. However, it is commonly employed in computer vision applications.

Relaxation labeling A set of M possible labels L={l1, l2,…, lM}. Pi(lk) is the probability of the ith pixel to belong to the kth class. They sum to one for each pixel. The labeling process starts with an initial estimate of probabilities for each pixel. A relaxation schedule modifies these probabilities. The procedure is repeated until stability.

Relaxation labeling Popular methods often take stochastic approaches to update the probabilities. A simple approach is based on the compatibility of label probabilities with the ones of their neighboring pixels. Simple decision rule for the effect of a neighbor (e.g. in a foreground/background problem): If P(neighbor being foreground)>0.5 then the contribution from the neighbor increments the same probability of the current pixel by a factor cp>0. Otherwise the probability decreases by cn <0.

Relaxation labeling Update in confidence for Pi(lk) for a two label problem: Updated label: