today introduction to mcmc particle filters and mcmc a simple example of particle filters: ellipse...

22
Today • Introduction to MCMC • Particle filters and MCMC • A simple example of particle filters: ellipse tracking

Post on 21-Dec-2015

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Today

• Introduction to MCMC

• Particle filters and MCMC

• A simple example of particle filters: ellipse tracking

Page 2: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Introduction to MCMC

• Sampling technique– Non-standard distributions (hard to sample)– High dimensional spaces

• Origins in statistical physics in 1940s

• Gained popularity in statistics around late 1980s

• Markov Chain Monte Carlo

Page 3: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Markov chains*

• Homogeneous: T is time-invariant– Represented using a transition matrix

},,,{ 21)(

si xxxx Series of samples

)|(),,|( )1()()1()1()( iiii xxTxxxp such that

* C. Andrieu et al., “An Introduction to MCMC for Machine Learning“, Mach. Learn., 2003

04.06.0

9.01.00

010

T

Page 4: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Markov chains

• Evolution of marginal distribution

• Stationary distribution

• Markov chain T has a stationary distribution– Irreducible– Aperiodic

)1(

)|()()( )1()()1()1(

)(

ix

iiii

ii xxTxpxpBayes’ theorem

ppp ii )1(

Page 5: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Markov chains

• Detailed balance– Sufficient condition for stationarity of p

• Mass transfer

)|()()|()( )1()()1()()1()( iiiiii xxTxpxxTxp

x(i-1)

x(i)

)( )1( ixp

)( )(ixp)|( )1()( ii xxT

)|( )()1( ii xxT

Probability mass

Probability mass

Proportion of mass transfer

)1(

)|()()( )1()()1()(

ix

iiii xxTxpxp

Pair-wise balance of mass transfer

Page 6: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Metropolis-Hastings

• Target distribution: p(x)• Set up a Markov chain with stationary p(x)

• Resulting chain has the desired stationary– Detailed balance

)1()( ii xx

)|(~ )(** ixxqx (Easy to sample from q)

*)1( xx i with probability

)|()(

)|()(,1min),(

)(*)(

*)(**)(

ii

ii

xxqxp

xxqxpxxA

)()1( ii xx otherwise

Propose

Page 7: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Metropolis-Hastings

• Initial burn-in period– Drop first few samples

• Successive samples are correlated– Retain 1 out of every M samples

• Acceptance rate– Proposal distribution q is critical

Page 8: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Monte-Carlo simulations*

• Using N MCMC samples• Target density estimation

• Expectation

• MAP estimation– p is a posterior

* C. Andrieu et al., “An Introduction to MCMC for Machine Learning“, Mach. Learn., 2003

Page 9: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Tracking interacting targets*

• Using partilce filters to track multiple interacting targets (ants)* Khan et al., “MCMC-Based Particle Filtering for Tracking a Variable Number of Interacting Targets”, PAMI, 2005.

Page 10: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Particle filter and MCMC

• Joint MRF Particle filter– Importance sampling in high dimensional

spaces– Weights of most particles go to zero– MCMC is used to sample particles directly

from the posterior distribution )|( tt ZXP

Page 11: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

MCMC Joint MRF Particle filter

• True samples (no weights) at each step

• Stationary distribution for MCMC

• Proposal density for Metropolis Hastings (MH)– Select a target randomly– Sample from the single target state proposal density

r

n

i

rtiit

Ejijtittt

t

t XXPXXXZcPZXP1

)1(,

)(),()()(

)|(~}{ 1111

tt

Nr

rt ZXPX

Page 12: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

MCMC Joint MRF Particle filter

• MCMC-MH iterations are run every time step to obtain particles

• “One target at a time” proposal has advantages:– Acceptance probability is simplified– One likelihood evaluation for every MH iteration– Computationally efficient

• Requires fewer samples compared to SIR

Page 13: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Particle filter for pupil (ellipse) tracking

• Pupil center is a feature for eye-gaze estimation

• Track pupil boundary ellipse

Pupil boundary edge points

Outliers

Ellipse overlaid on the eye image

Page 14: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Tracking

• Brute force: Detect ellipse every video frame– RANSAC: Computationally intensive

• Better: Detect + Track– Ellipse usually does not change too much between

adjacent frames

• Principle– Detect ellipse in a frame– Predict ellipse in next frame– Refine prediction using data available from next frame– If track lost, re-detect and continue

Page 15: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Particle filter?

• State: Ellipse parameters

• Measurements: Edge points

• Particle filter– Non-linear dynamics– Non-linear measurements

• Edge points are the measured data

Page 16: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Motion model

• Simple drift with rotation

),,,,( 00 bayxX (x0 , y0 )

a

b

θ

State

),(),(),(),(),()|( 21

21

21

2)1(0

2)1(01 00 tbtatytxttt bayxXXP

Gaussian

Could include velocity, acceleration etc.

Page 17: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Likelihood

• Exponential along normal at each point

• di: Approximated using focal bisector distance

d1

d2

d3

d4

d5

d6

z1z2

z3

z4

z5z6

i i

ii dXzPXZP )1

exp()|()|(

Page 18: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Focal bisector distance* (FBD)

• Reflection property: PF’ is a reflection of PF• Favorable properties

– Approximation to spatial distance to ellipse boundary along normal

– No dependence on ellipse size

FBDFoci

Focal bisector

* P. L. Rosin, “Analyzing error of fit functions for ellipses”, BMVC 1996.

Page 19: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Implementation details

• Sequential importance re-sampling*

• Number of particles:100• Expected state is the tracked ellipse• Possible to compute MAP estimate?

r

rtt

rttt

t

t XXPXZcPZXP )()()( 11

Proposal distribution:

Mixture of Gaussians

Weights:

Likelihood

* Khan et al., “MCMC-Based Particle Filtering for Tracking a Variable Number of Interacting Targets”, PAMI, 2005.

Page 20: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Initial resultsFrame 1: Detect Frame 2: Track Frame 3: Track

Frame 5: Track Frame 6: TrackFrame 4: Detect

Page 21: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Future?

• Incorporate velocity, acceleration into the motion model

• Use a domain specific motion model– Smooth pursuit– Saccades– Combination of them?

• Data association* to reduce outlier confound

* Forsyth and Ponce, “Computer Vision: A Modern Approach”, Chapter 17.

Page 22: Today Introduction to MCMC Particle filters and MCMC A simple example of particle filters: ellipse tracking

Thank you!