Particle Filter Tracking - courses.csail.mit.edu

Preview:

Citation preview

1

6.869

Computer Vision

Prof. Bill Freeman

Particle Filter Tracking – Particle filtering

Readings: F&P Extra Chapter: “Particle Filtering”

2

Schedule

• Tuesday, May 3: – Particle filters, tracking humans, Exam 2 out

• Thursday, May 5: – Tracking humans, and how to write conference papers

& give talks, Exam 2 due

• Tuesday, May 10:– Motion microscopy, separating shading and paint (“fun

things my group is doing”)

• Thursday, May 12: – 5-10 min. student project presentations, projects due.

3

1D Kalman filter

4

Kalman filter for computing an on-line average

• What Kalman filter parameters and initial conditions should we pick so that the optimal estimate for x at each iteration is just the average of all the observations seen so far?

5

Iteration 0 1 2

∞== −−00 0 σx

+

+

i

i

i

i

x

x

σ

σ

0

1,0,1,1 ====ii mdii md σσ

Kalman filter model

Initial conditions

0y

1

0y

1

210 yy +

21

210 yy +

21

3210 yyy ++

31

6

What happens if the x dynamics are given a non-zero variance?

7

Iteration 0 1 2

∞== −−00 0 σx

+

+

i

i

i

i

x

x

σ

σ

0

0y

1,1,1,1 ====ii mdii md σσ

Kalman filter model

Initial conditions

1

0y

2

32 10 yy +

32

35

852 210 yyy ++

85

32 10 yy +

(KF) Distribution propagation

8

prediction from previous time frame

Noise added to

that prediction

Make new measurement at next time frame

[Isard 1998]

Distribution propagation

9[Isard 1998]

10

Representing non-linear Distributions

11

Representing non-linear Distributions

Unimodal parametric models fail to capture real-world densities…

12

Representing non-linear Distributions

Mixture models are appealing, but very hard to propagate analytically!

13

Representing Distributions using Weighted Samples

Rather than a parametric form, use a set of samples to represent a density:

14

Representing Distributions using Weighted Samples

Rather than a parametric form, use a set of samples to represent a density:

Representing distributions using weighted samples, another picture

15[Isard 1998]

16

Sampled representation of a probability distribution

You can also think of this as a sum of dirac delta functions, each of weight w:

∑ −=i

iif uxwxp )()( δ

17

Marginalizing a sampled density

If we have a sampled representation of a joint density

and we wish to marginalize over one variable:

we can simply ignore the corresponding components of the samples (!):

18

Marginalizing a sampled density

19

Sampled Bayes Rule

Transforming a Sampled Representation of a Prior into a Sampled Representation of a Posterior:

posterior likelihood, prior

20

Sampled Bayes rule

21

Sampled Prediction= ?

~=Drop elements to marginalize to get

22

Sampled Correction (Bayes rule)

Prior posteriorReweight every sample with the likelihood of the

observations, given that sample:

yielding a set of samples describing the probability distribution after the correction (update) step:

23

Naïve PF Tracking

• Start with samples from something simple (Gaussian)

• Repeat

But doesn’t work that well because of sample impoverishment…

– Predict

– Correct

24

Sample impoverishment

Test with linear case:

kf: xpf: o

25

Sample impoverishment

10 of the 100 particles, along with the true Kalmanfilter track, with variance:

time

26

Resample the prior

In a sampled density representation, the frequency of samples can be traded off against weight:

These new samples are a representation of the same density.

I.e., make N draws with replacement from the original set of samples, using the weights as the probability of drawing a sample.

s.t.

27

Resampling concentrates samples

28

A practical particle filter with resampling

A variant (predict, then resample, then correct)

29[Isard 1998]

30

31

A variant (animation)

[Isard 1998]

32

Applications

Tracking– hands– bodies– leaves

Contour tracking

33[Isard 1998]

Head tracking

34[Isard 1998]

35

Leaf tracking

[Isard 1998]

36

Hand tracking

[Isard 1998]

37

Mixed state tracking

[Isard 1998]

38

Outline

• Sampling densities• Particle filtering

[Figures from F&P except as noted]

Recommended