Lecture 11: E-M and MeanShift. CAP 5415 Fall 2007

Similar documents
Segmentation and low-level grouping.

CS 534: Computer Vision Segmentation II Graph Cuts and Image Segmentation

The goals of segmentation

CS 534: Computer Vision Segmentation and Perceptual Grouping

6.801/866. Segmentation and Line Fitting. T. Darrell

Segmentation (continued)

Lecture 7: Segmentation. Thursday, Sept 20

Announcements. Image Segmentation. From images to objects. Extracting objects. Status reports next Thursday ~5min presentations in class

CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu. Lectures 21 & 22 Segmentation and clustering

Segmentation. Bottom Up Segmentation

Clustering Lecture 5: Mixture Model

Segmentation Computer Vision Spring 2018, Lecture 27

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation continued Graph Based Methods

Spectral Clustering. Presented by Eldad Rubinstein Based on a Tutorial by Ulrike von Luxburg TAU Big Data Processing Seminar December 14, 2014

Visual Representations for Machine Learning

Segmentation & Grouping Kristen Grauman UT Austin. Announcements

Expectation Maximization (EM) and Gaussian Mixture Models

Applications. Foreground / background segmentation Finding skin-colored regions. Finding the moving objects. Intelligent scissors

CS 229 Midterm Review

Targil 12 : Image Segmentation. Image segmentation. Why do we need it? Image segmentation

Clustering. CS294 Practical Machine Learning Junming Yin 10/09/06

Image Analysis - Lecture 5

Computer Vision 5 Segmentation by Clustering

human vision: grouping k-means clustering graph-theoretic clustering Hough transform line fitting RANSAC

Segmentation and Grouping

Unit 3 : Image Segmentation

Lecture 16 Segmentation and Scene understanding

Segmentation: Clustering, Graph Cut and EM

Introduction to Machine Learning CMU-10701

EE 701 ROBOT VISION. Segmentation

CS 1675 Introduction to Machine Learning Lecture 18. Clustering. Clustering. Groups together similar instances in the data sample

Unsupervised Learning: Clustering

Dr. Ulas Bagci

Mining Social Network Graphs

( ) =cov X Y = W PRINCIPAL COMPONENT ANALYSIS. Eigenvectors of the covariance matrix are the principal components

Normalized Graph cuts. by Gopalkrishna Veni School of Computing University of Utah

9.1. K-means Clustering

Mixture Models and EM

An Introduction to PDF Estimation and Clustering

From Pixels to Blobs

Segmentation and Grouping

Image Segmentation continued Graph Based Methods. Some slides: courtesy of O. Capms, Penn State, J.Ponce and D. Fortsyth, Computer Vision Book

Clustering Lecture 8. David Sontag New York University. Slides adapted from Luke Zettlemoyer, Vibhav Gogate, Carlos Guestrin, Andrew Moore, Dan Klein

Segmentation & Clustering

Image Segmentation. Marc Pollefeys. ETH Zurich. Slide credits: V. Ferrari, K. Grauman, B. Leibe, S. Lazebnik, S. Seitz,Y Boykov, W. Freeman, P.

CS 4495 Computer Vision. Segmentation. Aaron Bobick (slides by Tucker Hermans) School of Interactive Computing. Segmentation

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1

Image Segmentation. April 24, Stanford University. Philipp Krähenbühl (Stanford University) Segmentation April 24, / 63

Clustering: Classic Methods and Modern Views

CS 2750: Machine Learning. Clustering. Prof. Adriana Kovashka University of Pittsburgh January 17, 2017

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Fitting D.A. Forsyth, CS 543

Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. 2 April April 2015

Segmentation and Grouping April 19 th, 2018

Missing variable problems

Introduction to Mobile Robotics

Normalized cuts and image segmentation

Content-based Image and Video Retrieval. Image Segmentation

Tracking Computer Vision Spring 2018, Lecture 24

Computer Vision 6 Segmentation by Fitting

Clustering. So far in the course. Clustering. Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. dist(x, y) = x y 2 2

K-Means and Gaussian Mixture Models

Markov Random Fields and Segmentation with Graph Cuts

Image Segmentation. Luc Van Gool, ETH Zurich. Vittorio Ferrari, Un. of Edinburgh. With important contributions by

Computer Vision II Lecture 4

k-means demo Administrative Machine learning: Unsupervised learning" Assignment 5 out

Big Data Analytics. Special Topics for Computer Science CSE CSE Feb 11

SGN (4 cr) Chapter 11

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.


Unsupervised Learning

MultiDimensional Signal Processing Master Degree in Ingegneria delle Telecomunicazioni A.A

Grouping and Segmentation

Lecture 3 January 22

Supervised vs. Unsupervised Learning

22 October, 2012 MVA ENS Cachan. Lecture 5: Introduction to generative models Iasonas Kokkinos

Lecture 13 Segmentation and Scene Understanding Chris Choy, Ph.D. candidate Stanford Vision and Learning Lab (SVL)

CSCI-B609: A Theorist s Toolkit, Fall 2016 Sept. 6, Firstly let s consider a real world problem: community detection.

Inference and Representation

Machine Learning and Data Mining. Clustering (1): Basics. Kalev Kask

CS 664 Slides #11 Image Segmentation. Prof. Dan Huttenlocher Fall 2003

3 October, 2013 MVA ENS Cachan. Lecture 2: Logistic regression & intro to MIL Iasonas Kokkinos

Segmentation and Grouping April 21 st, 2015

CS 2750 Machine Learning. Lecture 19. Clustering. CS 2750 Machine Learning. Clustering. Groups together similar instances in the data sample

CS 2770: Computer Vision. Edges and Segments. Prof. Adriana Kovashka University of Pittsburgh February 21, 2017

Image Segmentation. Shengnan Wang

Mixture Models and the EM Algorithm

Spectral Classification

Computer Vision Lecture 6

Fall 09, Homework 5

Final Exam Study Guide

IBL and clustering. Relationship of IBL with CBR

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Lecture 10: Semantic Segmentation and Clustering

Computer Vision Lecture 6

Segmentation and Grouping

Methods for Intelligent Systems

Grouping and Segmentation

Transcription:

Lecture 11: E-M and MeanShift CAP 5415 Fall 2007

Review on Segmentation by Clustering Each Pixel Data Vector

Example (From Comanciu and Meer)

Review of k-means Let's find three clusters in this data These points could represent RGB triplets in 3D

Review of k-means Begin by guessing where the center of each cluster is

Review of k-means Now assign each point to the closest cluster

Review of k-means Now move each cluster center to the center of the points assigned to it Repeat this process until it converges

Probabilistic Point of View We'll take a generative point of view How to generate a data point: 1) Choose a cluster,z, from (1... N) 2) Sample that point from the distribution associated with that cluster 1D Example

Called a Mixture Model Probability of choosing cluster k Probability of x given the cluster is k z indicates which cluster is chosen or

To make it a Mixture of Gaussians Called a mixing coefficient

Brief Review of Gaussians

Mixture of Gaussians

In Context of Our Previous Model Now, we have means and covariances

How does this help with clustering? Let's think about a different problem first What if we had a set of data points and we wanted to find the parameters of the mixture model? Typical strategy: Optimize parameters to maximize likelihood of the data

Maximizing the likelihood Easy if we knew which cluster each point should belong to But we don't, so we get its probability function by using Bayes Rule

Where this comes from Let's differentiate with respect to \mu_k

EM Algorithm This is called the E-Step M-Step: Using these estimates of maximize the rest of the parameters Lots of interesting math and intuitions that go into this algorithm, that I'm not covering Take Pattern Recognition!

Back to clustering Now we have Can be seen as a soft-clustering

Another Clustering Application

Another Clustering Application In this case, we have a video and we want to segment out what's moving or changing from C. Stauffer and W. Grimson

Easy Solution Average a bunch of frames to get a Background Image Computer the difference between background and foreground

The difficulty with this approach The background changes (From Stauffer and Grimson)

Solution Fit a mixture model to the background I.E. A background pixel could have multiple colors

Can use this to track in surveillance

Suggested Reading Chapter 14, David A. Forsyth and Jean Ponce, Computer Vision: A Modern Approach. Chapter 3, Mubarak Shah, Fundamentals of Computer Vision

Advantages and Disadvantages

Mean-Shift Like EM, this algorithm is built on probabilistic intuitions. To understand EM we had to understand mixture models To understand mean-shift, we need to understand kernel density estimation (Take Pattern Recognition!)

Basics of Kernel Density Estimation Let s say you have a bunch of points drawn from some distribution What s the distribution that generated these points?

Using a Parametric Model Could fit a parametric model (like a Gaussian) Why: Can express distribution with a few number of parameters (like mean and variance) Why not: Limited in flexibility

Non-Parametric Methods We ll focus on kernel-density estimates Basic Idea: Use the data to define the distribution Intuition: If I were to draw more samples from the same probability distribution, then those points would probably be close to the points that I have already drawn Build distribution by putting a little mass of probability around each data-point

Example (From Tappen Thesis)

Formally Kernel Most Common Kernel: Gaussian or Normal Kernel Another way to think about it: Make an image, put 1(or more) wherever you have a sample Convolve with a Gaussian

What is Mean-Shift? The density will have peaks (also called modes) If we started at point and did gradient-ascent, we would end up at one of the modes Cluster based on which mode each point belongs to

Gradient Ascent? Actually, no. A set of iterative steps can be taken that will monotonically converge to a mode No worries about step sizes This is an adaptive gradient ascent (x = yj)

Results

Results

Normalized Cuts Clustering approach based on graphs First some background

Graphs A graph G(V,E) is a triple consisting of a vertex set V(G) an edge set E(G) and a relation that associates with each edge two vertices called its end points. (From Slides by Khurram Shafique)

Connected and Disconnected Graphs A graph G is connected if there is a path from every vertex to every other vertex in G. A graph G that is not connected is called disconnected graph. (From Slides by Khurram Shafique)

Can represent a graph with a matrix a b c e d One Row Per Node (Based on Slides by Khurram Shafique) [ 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 Adjacency Matrix: W ]

Can add weights to edges [ 0 1 3 1 0 4 2 3 4 0 6 7 6 0 1 Weight Matrix: W (Based on Slides by Khurram Shafique) 2 7 1 0 ]

Minimum Cut A cut of a graph G is the set of edges S such that removal of S from G disconnects G. Minimum cut is the cut of minimum weight, where weight of cut <A,B> is given as (Based on Slides by Khurram Shafique)

Minimum Cut There can be more than one minimum cut in a given graph All minimum cuts of a graph can be found in polynomial time1. H. Nagamochi, K. Nishimura and T. Ibaraki, Computing all small cuts in an undirected network. SIAM J. Discrete Math. 10 (1997) 469-481. 1 (Based on Slides by Khurram Shafique)

How does this relate to image segmentation? When we compute the cut, we've divided the graph into two clusters To get a good segmentation, the weight on the edges should represent pixels affinity for being in the same group (Images from Khurram Shafique)

Affinities for Image Segmentation Brightness Features Interpretation: High weight edges for pixels that Have similar intensity Are close to each other

Min-Cut won't work though The minimum-cut will often choose a cut with one small cluster (Image From Shi and Malik)

We need a better criterion Instead of min-cut, we can use the normalized cut Basic Idea: Big clusters will increase assoc(a,v), thus decreasing Ncut(A,B)

Finding the Normalized Cut NP-Hard Problem Can find approximate solution by finding the eigenvector with the second-smallest eigenvalue of this generalized eigenvalue problem That splits the data into two clusters Can recursively partition data to find more clusters Code available on Jianbo Shi's webpage

Results Figure from Normalized cuts and image segmentation, Shi and Malik, 2000

So what if I want to segment my image? Ncuts is a very common solution Mean-shift is also very popular