Docsity

Mean-Shift Algorithm: From Kernel Density Estimation to Mean-Shift Tracking, Study notes of Computer Science

Partial preview of the text

Download Mean-Shift Algorithm: From Kernel Density Estimation to Mean-Shift Tracking and more Study notes Computer Science in PDF only on Docsity!

CSE598G

More on Mean-shift

R.Collins, CSE, PSU

CSE598G Spring 2006

CSE598G

Recall: Kernel Density Estimation

Given a set of data samples xi; 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

CSE598G

Radially Symmetric Kernels

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

CSE598G

Kernel-Shadow Pairs

h’(r) = - c k (r)

Given a convolution kernel H, what is the corresponding mean-shift kernel K? Perform change of variables r = ||xi-x||^2 Rewrite H(xi-x) => h(||xi-x||^2 ) => h(r). Then kernel K must satisfy

Examples

Epanichnikov Biweight Gaussian Epanichnikov Gaussian Flat self-replicating!

CSE598G

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

CSE598G

Mean-Shift and Gradient Ascent

Sidebar derivation: chain rule change of variables change variables back

CSE598G

Mean-Shift and Gradient Ascent

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

CSE598G

Mean-Shift and Gradient Ascent

cont. weighted center of mass mean shift vector

  • same direction as gradient of KDEH
    • step size is inversely proportional to KDEK
    • mean-shift performs gradient ascent with adaptive step size

CSE598G

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

CSE598G

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.

CSE598G

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)

CSE598G

Sidebar: Swain and Ballard, 1991

Using color histograms for recognition.

CSE598G

Swain and Ballard

Note: relationship between recognition and tracking.

This will come up again later.

CSE598G

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