Transcript Document

Real-Time Tracking with Mean
Shift
Presented by: Qiuhua Liu
May 6, 2005
Outline
Color model for the target
Introduction to mean-shift
Tracking algorithm with mean shift
Compassion with Particle Filter
algorithm with the similar color model
Color Model for the Target
The target is represented by an ellipsoidal region in
*
the image, normalized to a unit circle. Let {xi }i 1,...n
be the normalized pixel locations in the region
centered at 0.
The probability of the feature(color) of the target was
modeled by the its histogram with kernel K :
n
qˆu  C  k (|| xi* ||2 ) [b( xi* )  u], u  1,...m bins
i 1
The kernel K has a convex and monotonic decreasing
kernel profile k, assigning small weights to pixels
farther away from the center.
Target Candidate
The profile of kernel K is defined as a function
k : [0, ]  R such that
K ( x)  k (|| x ||2 )
*
i i 1,...n h
Let {x }
be the normalized pixel locations of
the target candidates, centered at y in the current
frame. The target candidate is modeled as:
y  xi
pˆ u ( y )  Ch  k (
) [b( xi* )  u], u  1,...m bins
h
i 1
nh
2
Similarity Function
The similarity function is defined as the metric distance
between the candidate and the target model:
d ( y)  1  [ pˆ ( y), q]
Choose  as the Bhattacharyya coefficients (it is a
divergence type measure)
m
 [ pˆ ( y ), q]   pˆ u ( y )qu
u 1
Minimizing the distance is equivalent to maximizing

.
Maximization with Mean Shift
Assume the target candidate histogram does not
change drastically, using Taylor expansion around the
values pˆ u ( y0 ) at location y0:
1 m
1 m
qˆu
 [ pˆ ( y ), q]   pˆ u ( yˆ 0 )qˆu   pˆ u ( y )
2 u 1
2 u 1
pˆ u ( yˆ 0 )
m
1
Ch
  pˆ u ( yˆ 0 )qˆu 
2 u 1
2
m
where
wi  
i 1
y  xi
wi k (
)

h
i 1
nh
2
qˆu
 [b( xi )  u ]
pˆ u ( yˆ 0 )
Only need to maximize the second term, which is the
density estimate with kernel profile k(x) at y in the
current frame, with the data being weighted by wi.
Mean Shift
First Introduced by Fukunaga and Hostetler in 1975
[1], Mean shift is a non-parametric, iterative
procedure to find the mode of a density function
represented by a set of samples {xi }i 1,... n and a
Kernel K :
ˆf ( x )  1
nh d
 x  xi 
K


 h 
i 1
n
d: dimension of data;
h: band width.
With the definition of the Profile of a kernel:
 x  xi
1
fˆk ( x )  d  k 
nh i 1  h
n
2




Mean Shift
With mean shift method, the kernel is recursively
moved from the current location yˆ 0 to the new location
yˆ1 until converge with:
yˆ 0  xi
)
i 1 xi wi g ( h
yˆ1 
2
ˆ
nh
y0  xi
)
i 1 wi g ( h
2
nh
where g ( x )  k ( x ).
For a kernel with a convex and monotonic decreasing
kernel profile, it is guaranteed to converge (to local
maxima)
One Normally Used Kernel
The Epanechnikov kernel has a profile:
 1 1
 cd (d  2)(1  x )
KE ( x)   2
0
if x  1
otherwise
where cd is the volume of the unit d -dimensional sphere.
Then
g ( x )  k ( x )  const


nh
ˆ1 
y
i 1
nh
xi wi
i 1
wi
(*)
Tracking Algorithm with Mean
Shift
Very Simple:
Given the target model
previous frame.
qˆu and its location yˆ 0 in the
1. Initialize the location at the current frame with yˆ 0 .
2. Compute the next location yˆ1 according to (*).
3. Iterate 1 and 2 until converge.
Tracked Result:
Mean Shift Maximization:
Summary and Comparison to
Particle Filter Method
Advantage:

Good color histogram model and distance measure.
 Deterministic method: the mean shift usually
converged at 2 to 3 iterations –Fast.
Disadvantage:
 Sometimes get stuck at local minimum.
 Difficult to handle abrupt motion:
Due to use of the kernels, the center of the target in
the current frame has to be covered by the target
model in the previous frame. Otherwise, the local
maximum of the Bhattacharyya coefficient would not
be a reliable indicator.
Connection to Particle Filter Tracking
Adopting the same distance measure, Jaco Vermaak
[4][5] proposed the following observation likelihood
function for probabilistic tracking with particle filters
and VB inference :
p( yt | xt )  exp(d 2 [qu , pu ( xt )])
The histogram does not necessarily need a kernel.
Comparison
Top: Deterministic with Mean-shift
Bottom: Probabilistic with particle filters
References
[1] Fukunaga et al, “The Estimation of the Gradient of a
Density Function, with Applications in Pattern
Recognition”, IEEE Trans. on Information Theory, 1975
[2] Dorin Comaniciu et al, “Real-time Tracking of Non-Rigid
Objects Using Mean Shift”, CVPR 2000.
[3] Dorin Comaniciu et al, “Kernel-Based Object Tracking”,
IEEE Trans . On Pattern Analysis and Machine Learning , May
2003.
[4] Jaco Vermaak et al
[5] Jaco Vermaak et al, “Variational Inference for Visual
Tracking”, CVPR, 2003