32
1 7 6.869 Computer Vision Recursive filtering for tracking-- Kalman filtering and particle filtering. April 11, 2011 Bill Freeman and Antonio Torralba 1 7

1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

Embed Size (px)

Citation preview

Page 1: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

17

6.869 Computer Vision

Recursive filtering for tracking--Kalman filtering and particle filtering.

April 11, 2011

Bill Freeman and Antonio Torralba

17

Page 2: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

18

• See slide notes for material to be presented on board.

18

Page 3: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

17

Representing non-linear Distributions

Page 4: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

18

Representing non-linear Distributions

Unimodal parametric models fail to capture real-world densities…

Page 5: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

19

Discretize by evenly sampling over the entire state space

Tractable for 1-d problems like stereo, but not for high-dimensional problems.

Page 6: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

20

Representing Distributions using Weighted Samples

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

Page 7: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

21

Representing Distributions using Weighted Samples

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

Sample positions Probability mass at each sample

This gives us two knobs to adjust when representing a probability density by samples: the locations of the samples, and the probability weight on each sample.

Page 8: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

22

[Isard 1998]

Representing distributions using weighted samples, another picture

Page 9: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

23

Sampled representation of a probability distribution

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

Page 10: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

Tracking, in particle filter representation

24

P(xn | y1...yn ) = k P(yn | xn ) dxn−1P(xn | xn−1)P(xn−1 | y1...yn−1)∫

x1 x2 x3

y1 y2 y3

Prediction stepUpdate step

Page 11: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

25

Particle filter

• Let’s apply this sampled probability density machinery to generalize the Kalman filtering framework.

• More general probability density representation than uni-modal Gaussian.

• Allows for general state dynamics, f(x) + noise

Page 12: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

26

Sampled Prediction= ?

~=Drop elements to marginalize to get

Page 13: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

27

Sampled Correction (Bayes rule)

Prior posterior

Reweight 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:

Page 14: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

28

Naïve PF Tracking

• Start with samples from something simple (Gaussian)

• Repeat

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

– Predict

– Correct

s

Take each particle from the prediction step and modify the old weight by multiplying by the new likelihood

Run every particle through the dynamics function and add noise.

Page 15: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

29

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

Sample impoverishment

time

Page 16: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

30

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.

Resample the prior

s.t.

Page 17: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

31

Resampling concentrates samples

Page 18: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

32

A practical particle filter with resampling

Page 19: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

33

Pictorial view

[Isard 1998]

Page 20: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

34

Page 21: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

35

Page 22: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

36

Animation of condensation algorithm

[Isard 1998]

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Page 23: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

37

Tracking– hands– bodies– Leaves

What might we expect?

Reliable, robust, slow

Applications

Page 24: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

38

Contour tracking

[Isard 1998]

Page 25: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

39

Head tracking

[Isard 1998]

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Picture of the states represented by the top weighted particles

The mean state

Page 26: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

40

Leaf tracking

[Isard 1998]

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Page 27: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

41

Hand tracking

[Isard 1998]

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Page 28: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

Probabilistic Tracking and Probabilistic Tracking and Reconstruction of 3D Human Motion Reconstruction of 3D Human Motion

in Monocular Video Sequencesin Monocular Video Sequences

Probabilistic Tracking and Probabilistic Tracking and Reconstruction of 3D Human Motion Reconstruction of 3D Human Motion

in Monocular Video Sequencesin Monocular Video Sequences

Presentation of the thesis work of:

Hedvig Sidenbladh, KTH

Thesis opponent: Prof. Bill Freeman, MIT

Page 29: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

Thesis supervisorsThesis supervisors

• Prof. Jan-Olof Eklundh, KTH• Prof. Michael Black, Brown University

• Dr. David Fleet, Xerox PARC• Prof. Dirk Ormoneit, Stanford University

CollaboratorsCollaborators

Page 30: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

Models of Human DynamicsModels of Human Dynamics

• Action-specific model - Walking– Training data: 3D motion capture data– From training set, learn mean cycle and

common modes of deviation (PCA)

Mean cycle Small noise Large noise

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Page 31: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

Walking PersonWalking Person

Walking model

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

2500 samples~10 min/frame

#samples from 15000 to 2500by using the learned likelihood

Page 32: 1 Schedule. May 4, 2009 6.869 Monday, May 4: –Lecture on tracking objects and people. Wednesday, May 6: –Lecture on writing papers and giving talks. Monday,

No likelihoodNo likelihood

* how strong is the walking prior? (or is our likelihood doing anything?)

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.