Robert Collins CSE598G. More on Mean-shift. R.Collins, CSE, PSU CSE598G Spring 2006



Similar documents
Lecture 3: Linear methods for classification

Mean-Shift Tracking with Random Sampling

Image Segmentation and Registration

Colour Image Segmentation Technique for Screen Printing

Image Gradients. Given a discrete image Á Òµ, consider the smoothed continuous image ܵ defined by

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Christfried Webers. Canberra February June 2015

Logistic Regression. Vibhav Gogate The University of Texas at Dallas. Some Slides from Carlos Guestrin, Luke Zettlemoyer and Dan Weld.

Linear Classification. Volker Tresp Summer 2015

Segmentation & Clustering

STA 4273H: Statistical Machine Learning

An Introduction to Machine Learning

Statistical Machine Learning

Example: Credit card default, we may be more interested in predicting the probabilty of a default than classifying individuals as default or not.

Logistic Regression. Jia Li. Department of Statistics The Pennsylvania State University. Logistic Regression

PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 4: LINEAR MODELS FOR CLASSIFICATION

A Study on SURF Algorithm and Real-Time Tracking Objects Using Optical Flow

Linear Threshold Units

Assessment. Presenter: Yupu Zhang, Guoliang Jin, Tuo Wang Computer Vision 2008 Fall

Probabilistic Latent Semantic Analysis (plsa)

jorge s. marques image processing

Multivariate data visualization using shadow

COMPARISON OF OBJECT BASED AND PIXEL BASED CLASSIFICATION OF HIGH RESOLUTION SATELLITE IMAGES USING ARTIFICIAL NEURAL NETWORKS

These slides follow closely the (English) course textbook Pattern Recognition and Machine Learning by Christopher Bishop

A Learning Based Method for Super-Resolution of Low Resolution Images

Digital Imaging and Multimedia. Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

Basics of Statistical Machine Learning

Metrics on SO(3) and Inverse Kinematics

CSE168 Computer Graphics II, Rendering. Spring 2006 Matthias Zwicker

MVA ENS Cachan. Lecture 2: Logistic regression & intro to MIL Iasonas Kokkinos Iasonas.kokkinos@ecp.fr

Machine Learning and Pattern Recognition Logistic Regression

Lecture 9: Introduction to Pattern Analysis

Syntax Menu Description Options Remarks and examples Stored results Methods and formulas References Also see. Description

Java Modules for Time Series Analysis

Practical Tour of Visual tracking. David Fleet and Allan Jepson January, 2006

H.Calculating Normal Vectors

Mean Shift Based Clustering in High Dimensions: A Texture Classification Example

Determining optimal window size for texture feature extraction methods

Predict Influencers in the Social Network

Vision based Vehicle Tracking using a high angle camera

1 Maximum likelihood estimation

Computational Foundations of Cognitive Science

Part-Based Recognition

Bildverarbeitung und Mustererkennung Image Processing and Pattern Recognition

Machine vision systems - 2

The Basics of Graphical Models

Automatic 3D Reconstruction via Object Detection and 3D Transformable Model Matching CS 269 Class Project Report

Environmental Remote Sensing GEOG 2021

Image Normalization for Illumination Compensation in Facial Images

Logistic Regression (1/24/13)

Video Surveillance System for Security Applications

Several Views of Support Vector Machines

Robust Scale-adaptive Mean-Shift for Tracking

Visualization and Feature Extraction, FLOW Spring School 2016 Prof. Dr. Tino Weinkauf. Flow Visualization. Image-Based Methods (integration-based)

LABEL PROPAGATION ON GRAPHS. SEMI-SUPERVISED LEARNING. ----Changsheng Liu

Machine Learning in Spam Filtering

DYNAMIC RANGE IMPROVEMENT THROUGH MULTIPLE EXPOSURES. Mark A. Robertson, Sean Borman, and Robert L. Stevenson

Spatio-Temporal Nonparametric Background Modeling and Subtraction

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

CCNY. BME I5100: Biomedical Signal Processing. Linear Discrimination. Lucas C. Parra Biomedical Engineering Department City College of New York

Modelling, Extraction and Description of Intrinsic Cues of High Resolution Satellite Images: Independent Component Analysis based approaches

High Quality Image Deblurring Panchromatic Pixels

Texture. Chapter Introduction

A Real Time Hand Tracking System for Interactive Applications

STT315 Chapter 4 Random Variables & Probability Distributions KM. Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables

degrees of freedom and are able to adapt to the task they are supposed to do [Gupta].

A Comparative Study between SIFT- Particle and SURF-Particle Video Tracking Algorithms

QUALITY TESTING OF WATER PUMP PULLEY USING IMAGE PROCESSING

An Iterative Image Registration Technique with an Application to Stereo Vision

Linköping University Electronic Press

2.2 Creaseness operator

HT2015: SC4 Statistical Data Mining and Machine Learning

Practice Final Math 122 Spring 12 Instructor: Jeff Lang

Adaptive Online Gradient Descent

PS 271B: Quantitative Methods II. Lecture Notes

Dirichlet Processes A gentle tutorial

Volume visualization I Elvins

DIGITAL IMAGE PROCESSING AND ANALYSIS

Canny Edge Detection

CS 688 Pattern Recognition Lecture 4. Linear Models for Classification

Level Set Framework, Signed Distance Function, and Various Tools

CSCI567 Machine Learning (Fall 2014)

Bandwidth Selection for Nonparametric Distribution Estimation

Convolution. 1D Formula: 2D Formula: Example on the web:

The Artificial Prediction Market

Electromagnetism - Lecture 2. Electric Fields

Classification by Pairwise Coupling

A Complete Gradient Clustering Algorithm for Features Analysis of X-ray Images

siftservice.com - Turning a Computer Vision algorithm into a World Wide Web Service

Bayesian Image Super-Resolution

Recognizing Cats and Dogs with Shape and Appearance based Models. Group Member: Chu Wang, Landu Jiang

Social Media Mining. Data Mining Essentials

PHOTOGRAMMETRIC TECHNIQUES FOR MEASUREMENTS IN WOODWORKING INDUSTRY

Object Recognition. Selim Aksoy. Bilkent University

McAFEE IDENTITY. October 2011

Using the ac Method to Factor

Online Learning for Offroad Robots: Using Spatial Label Propagation to Learn Long Range Traversability

Transcription:

More on Mean-shift R.Collins, CSE, PSU Spring 2006

Recall: Kernel Density Estimation Given a set of data samples x i ; i=1...n Convolve with a kernel function H to generate a smooth function f(x) Equivalent to superposition of multiple kernels centered at each data point H

Recall: Kernel Density Estimation For kernel H with bandwidth h, estimated function value f at location x is superposition of kernels centered at x i some sample kernels:

Radially Symmetric Kernels Height at point is function only of distance from center Can be written in terms of a 1D Profile function that is is a function of the radius (we will use squared radius below)

Kernel-Shadow Pairs Given a convolution kernel H, what is the corresponding mean-shift kernel K? Perform change of variables r = x i -x 2 Rewrite H(x i -x) => h( x i -x 2 ) => h(r). Then kernel K must satisfy h (r) = - c k (r) Examples Epanichnikov Flat Biweight Epanichnikov Gaussian Gaussian self-replicating!

Kernel-Shadow Pairs Given a convolution kernel H, what is the corresponding mean-shift kernel K? Perform change of variables r = x i -x 2 Rewrite H(x i -x) => h( x i -x 2 ) => h(r). Then kernel K must satisfy h (r) = - c k (r) 2D Shadow Examples Kernel 2D Epanichnikov Flat Gaussian Gaussian

Mean-Shift and Gradient Ascent We will derive an explicit equation relating the mean-shift procedure using kernel K with gradient ascent on the KDE surface formed by using the shadow kernel H. gradient of KDE rewrite using profile function

Mean-Shift and Gradient Ascent Sidebar derivation: change of variables chain rule change variables back

Mean-Shift and Gradient Ascent We will derive an explicit equation relating the mean-shift procedure using kernel K with gradient ascent on the KDE surface formed by using the shadow kernel H. gradient of KDE rewrite using profile function change of vars + chain rule definition of kernel shadow pairs h (r) = - c k(r) rewrite as kernel K

cont. Mean-Shift and Gradient Ascent call this p(x). It is another KDE, using kernel K instead of H x this does not depend on i, so can come out of the summation this is just 1! this is the relationship we wanted to derive.

cont. Mean-Shift and Gradient Ascent weighted center of mass mean shift vector same direction as gradient of KDE H step size is inversely proportional to KDE K mean-shift performs gradient ascent with adaptive step size

Generalizing to Weighted Points Let each point sample x i have an associated nonnegative weight w(x i ) Can rederive the equations with w(x i ) factors in them: KDE using shadow kernel H KDE using kernel K mean shift vector is still a gradient ascent process This is important for running on images. Since pixels form a lattice, spatial density of samples is fixed, so need a weight to denote sample density at each point.

Mean-Shift Tracking Let pixels form a uniform grid of data points, each with a weight (pixel value) proportional to the likelihood that the pixel is on the object we want to track. Perform standard mean-shift algorithm using this weighted set of points. Δx = Σ i K(x i -x) w(x i ) (x i -x) Σ i K(x i -x) w(x i )

Nice Property Running mean-shift with kernel K on weight image w is equivalent to performing gradient ascent in a (virtual) image formed by convolving w with some shadow kernel H. Computational savings: only have to compute convolution values at the relatively small number of points you visit on the path to the mode.

Mean-shift on Weight Images Ideally, we want an indicator function that returns 1 for pixels on the object we are tracking, and 0 for all other pixels Instead, we compute likelihood maps where the value at a pixel is proportional to the likelihood that the pixel comes from the object we are tracking. Computation of likelihood can be based on color texture shape (boundary) predicted location Claim: these weight images are all the mean-shift algorithm sees, whether they be explicitly computed (e.g. Bradski) or implicitly computed (e.g. Comaniciu, Ramesh and Meer).

Explicit Weight Images histogram backprojection histogram is an empirical estimate of p(color object) = p(c o) Bayes rule says p(o c) = p(c o) p(o) / p(c) Simplistic approx: assume (p(o)/p(c)) is constant. Then p(o c) = p(c o). Use histogram h as a lookup table to set pixel values in the weight image. (if pixel maps to bucket i in histogram h, set weight for that pixel to h(i)

Sidebar: Swain and Ballard, 1991 Using color histograms for recognition.

Swain and Ballard does this sound familiar?

Swain and Ballard Note: relationship between recognition and tracking. This will come up again later.

Sidebar: Jones and Rehg, 2002 Statistical Color Models with Application to Skin Detection, M. J. Jones and J. M. Rehg, Int. J. of Computer Vision, 46(1):81-96, Jan 2002 General Idea: Learn skin color distribution from examples Learn distributions of skin and nonskin color Nonparametric distributions: color histograms Bayesian classification of skin pixels

Learning from Examples First, have your grad student hand label thousands of images from the web P(rgb skin) = number of times rgb seen for a skin pixel total number of skin pixels seen P(rgb not skin) = number of times rgb seen for a non-skin pixel total number of non-skin pixels seen These statistics stored in two 32x32x32 RGB histograms Skin histogram Non-Skin histogram R R G B G B

Learned Distributions Skin color Non-Skin color

Likelihood Ratio Label a pixel skin if P(rgb skin) P(rgb not skin) > Θ Θ = (cost of false positive) P( seeing not skin) (cost of false negative) P( seeing skin) 0 <= Θ <= 1

Sample Pixel Classifications Θ =.4

Sample Application: HCI Haiying Guan, Matthew Turk, UCSB relevance to blob tracking is clear

Implicit Weight Images Sometimes the weight image is not explicitly created. An example is Comaniciu, Ramesh and Meer. Here, the weight image is embedded in the procedure (taking derivatives of bhattacharyya coeff with respect to image location of the window of samples). Interesting point: their weight image changes between iterations of mean-shift, as compared to iterating to convergence on an explicit weight image!

Comaniciu et.al. Color Histogram Representation: Distance between histograms measured by: where note: this is a function of window of location y Bhattacharyya coefficient

Comaniciu et.al. the histograms are computed via Parzen estimation: where k is some radially symmetric smoothing kernel (profile) This is Important! interpolates histograms in off-lattice locations makes histogram p u differentiable wrt to y

Comaniciu et.al. via Taylor series expansion about current window location y 0 : this does not depend on y so just need to maximize this. Note: it is a KDE!!!! where find mode of second term by mean-shift iterations:

At each iteration: Comaniciu et.al. which is just standard mean-shift on (implicit) weight image w i Let s look at the weight terms more closely. For each pixel x i : If pixel x i s value maps to histogram bucket B, then w i = sqrt(q B / p B (y 0 )) This term is only 1 once in the summation

Comaniciu et.al. So if model histogram is q 1, q 2,..., q m and current data histogram is p 1, p 2,..., p m form weights q 1 / p 1, q 2 / p 2,..., q m / p m and then do histogram backprojection of these values into the image to get the weight image w i note to self: Swain and Ballard also note, p 1, p 2,..., p m changes at each iteration, and therefore so does the weight image w i

Qualitative Intuition Assume some object that is 60% red and 40%green q1 =.6, q2 =.4, qi = 0 for all other i If we just did histogram backprojection of these likelihood values (ala Bradski), we would get a weight image.6.4 0.0

Qualitative Intuition.6.4 0.0 Mean shift does a weighted center of mass computation at each interation Mean shift window will be biased towards the region of red pixels, since they have higher weight

Qualitative Intuition Now use Comaniciu et.al. s weights Let s say the data histogram is perfectly located q1 =.6, q2 =.4, qi = 0 for all other i p1 =.6, p2 =.4, pi = 0 for all other i w1 = sqrt(.6/.6), w2 = sqrt(.4/.4), wi = 0 for all other i Resulting weight image: say something about 0 values This is the indicator function image we always hope for! 1.0 1.0 0.0

Qualitative Intuition Say we have too little percentage of red in data hist q1 =.6, q2 =.4, qi = 0 for all other i p1 =.5, p2 =.5, pi = 0 for all other i w1 = sqrt(.6/.5), w2 = sqrt(.4/.5), wi = 0 for all other i >1 <1 So red pixels will be favored in center of mass computation, hopefully causing more of them to be included at the next iteration.

Qualitative Intuition Say we have very little percentage of red in data hist q1 =.6, q2 =.4, qi = 0 for all other i p1 =.2, p2 =.8, pi = 0 for all other i w1 = sqrt(.6/.2), w2 = sqrt(.4/.8), wi = 0 for all other i >>1 <<1 So red pixels will be even more highly weighted relative to green pixels.

Qualitative Intuition Say we have too much percentage of red in data hist q1 =.6, q2 =.4, qi = 0 for all other i p1 =.7, p2 =.3, pi = 0 for all other i w1 = sqrt(.6/.7), w2 = sqrt(.4/.3), wi = 0 for all other i <1 >1 So green pixels will now be favored.

Other Features We ve only talked about color, but of course we could use histograms of other features like edge orientations (or any filter-bank response) However, one point I ve been trying to make today is that we don t need histograms at all. We just need a way to label pixels with the likelihood that they belong to the object (rather than the background). That is, we just need to be able to specify a weight image, either explicitly or implicitly.

Discuss using mean-shift to find modes in correlation surfaces Explicit is easy. Implicit??

Brief overview of our two bleeding edge topics Choose discussion leaders.