View
222
Download
0
Tags:
Embed Size (px)
Citation preview
Particle filters (continued…)
Recall
• Particle filters – Track state sequence xi given the measurements (y0,
y1, …., yi)
– Non-linear dynamics
– Non-linear measurements
iilinearnoni xfx )(1
iilinearnoni xgy )(
Non-Gaussian
Non-Gaussian
Recall
• Maintain a representation of • Two stages
– Prediction
– Correction (Bayesian)
),,( 0 ii yyxP
),,( 101 ii yyxP ),,( 10 ii yyxP
),,( 0 ii yyxP ),,( 10 ii yyxP
Dynamic model (Markov)
Likelihood
Prior Posterior)( ii xyP
)( 1ii xxP
3 Useful tools
• Importance sampling
– Tool 1: Representing a distribution– Tool 2: Marginalizing– Tool 3: Transforming prior to posterior
Tool 1: Representing a distribution
• Have a set of samples ui with weights wi
• (ui, wi ): Sampled representation of f(u)
• Expectation under f(u)
• Samples used only as a means to evaluate expectations (Not true samples!)
iu iw)(us)(
)(
us
uf~
N
i
i
N
i
ii
w
wugduufug
1
1
)()()(
Tool 2: Marginalization
• Marginalization
• Sampled representation
• Just retain the required components and ignore the rest!
dNNMfMf ),()(
),(~)}),,{(( 1 nmfwnm Ni
iii )(~)},{( 1 mfwm N
iii
Drop ni
Tool 3: From Prior to Posterior)(~)},{( 1 ufwu N
iii
)(~)}~,{( 1 uzwu Ni
ii
)(
)(
)(
)(
)(
)(
)(
)(~i
ii
i
i
i
i
i
ii
uf
uzw
uf
uz
us
uf
us
uzw
Prior
Posteriorww ii ~
)(
)( 0
i
ii
uP
vvuPw
)( 0ii uvvPw
• Modify the weights to transform from one distribution to another
• Similarly for going from prior to posterior
?
To
From
To
From
Scale factor is the same for all the samples
Simple Particle filter
• Prediction
• 2 steps– Sampling from joint distribution
– Marginalization
),,()(),,,( 1011101 iiiiiii yyxPxxPyyxxP
),,( 101 ii yyxP ),,( 10 ii yyxP Dynamic model (Markov)
)( 1ii xxP
)},{( 11ki
ki wu )}1,)({( 1
li
kiuf )}),,)({(( 111
ki
ki
li
ki wuuf
),,,( 101 iii yyxxP ),,( 10 ii yyxP
)}),,)({(( 111ki
ki
li
ki wuuf )},)({( 11
ki
li
ki wuf Drop
kiu 1
(Notation: Chapter 2)
Simple Particle filter
• Correction
• Modify weights
)},)({( 11ki
li
ki wuf
),,( 0 ii yyxP ),,( 10 ii yyxP Likelihood
Prior Posterior)( ii xyP
)})(,{( ,,, ki
kiii
ki wsxyPs
)},{( ,, ki
ki ws
)},{( ,, ki
ki ws
Let
Likelihood
)( , kiii sxyP
Improved Particle filter
• Simple Particle filter– Many samples have small weights– Number of samples increases at every step– Lots of samples wasted
• Resample (Sampling-Importance -Resampling)– Prior:– Predictions:
• Resampling also takes care of increasing number of samples
),,( 101 ii yyxP ),,( 10 ii yyxP
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.
Independent Particle filters
• Targets lose identity
• Identical appearance– Multiple peaks in the likelihood– Best peak “hijacks” all the nearby targets
Alternate view of Particle filters
• Notation*
11
11 )()()()( tt
ttttt
t
t dXZXPXXPXZcPZXP
*Khan et al., “MCMC-Based Particle Filtering for Tracking a Variable Number of Interacting Targets”, PAMI, 2005.
tX State at time t
tZ Measurement at time t
tZ All measurements upto time t
Posterior Prior
Marginalization
Likelihood
Alternate view of Particle filters
• Sampled representation of prior
• Monte-Carlo approximation
)|(~},{ 11111
tt
Nr
rt
rt ZXPX
1111 )()()()( tttttttt
t dXZXPXXPXZcPZXP
r
rtt
rttt
t
t XXPXZcPZXP )()()( 11
Alternate view of Particle filters
• Sequential Importance Resampling (SIR)
• Particles at time t
• Weights (easy to verify!)
• Prediction and correction in one step
r
rtt
rttt
t
t XXPXZcPZXP )()()( 11
r
rtt
rtt
st XXPXqX )|()(~ 11
Particles sampled from a mixture distribution formed by previous particle set
)|( stt
st XZP
Independent vs. Joint filters
• Multiple targets– Joint state space: Union of individual state spaces
• Independent targets– Predictions are made independently from respective
spaces
• Interacting targets– Predictions are from the joint state space– High dimensionality: MCMC better than Importance
sampling?
),,,( 21 ntttt XXXX
n
itiittt XXPXXP
1)1(1 )|()|(
Interacting targets
• Targets influence the dynamics of others• Particles cannot be propagated independently
• Model interactions between targets using Markov Random Fields (MRF)
n
itiittt XXPXXP
1)1(1 )|()|(
n
i Ejijtittiittt XXXXPXXP
1 ,)1(1 ),()|()|(
Individual dynamics
Pair wise interactions
MRF
• Interaction potential
• g(Xit , Xjt) penalizes overlap between targets
• Takes care of “hijacking”
)),(exp(),( jtitjtit XXgXX
Edges are formed only when templates overlap
Overlap is penalized by the interaction potential
Joint MRF Particle filter
• Sequential Importance Resampling
• Particles at time t
• Weights
• Interactions affect only the weights
r
n
i
rtiit
rt
Ejijtittt
t
t XXPXXXZcPZXP1
)1(1,
)(),()()(
r
n
i
rtiit
rtt
st XXPXqX
1)1(1 )|()(~
Eji
sjt
sit
stt
st XXXZP
,
),()|(
Equivalent to independent particle filters
Target overlap
• Targets overlap on each other and then segregate
• Overlapped target state “hijacked”• Probably hard to model this?
Why 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
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
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
Variable number of targets
• Target identifiers kt is a state variable
• Each kt determines a corresponding state space
• State space is the union of state spaces indexed by kt
• Particle filtering
• RJMCMC to jump across state spaces
)|,( 11 1
tkt ZXkP
t)|,( t
kt ZXkPt
tkX
Prediction + Correction
Thank you!