1 / 49

From Bayesian to Particle Filter

From Bayesian to Particle Filter. San Francisco State University Mathematics Department Fang-I Chu. Outline. Introduction Mathematical Background Literatures Review Application – Object Tracking in Video Conclusion. Introduction.

milly
Download Presentation

From Bayesian to Particle Filter

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. From Bayesian to Particle Filter San Francisco State University Mathematics Department Fang-I Chu

  2. Outline • Introduction • Mathematical Background • Literatures Review • Application – Object Tracking in Video • Conclusion

  3. Introduction • Why tracking moving object is important ? • Simulate the moving path of the target • Important applications: robot, medical (eye movement, neurology), security systems, Wii • What we want to do • Simple movement: easy • Erratic movement: need to be done • How we approach it • Filtering algorithms in computer science vision

  4. Mathematical Background • Conditional Probability • Bayes’ Theorem • Prior and Posterior Probability • Markov Chain

  5. Conditional Probability • Conditional Probability • Any probability that is revised to take into account the known occurrence of other events • Written as , given the probability of event happens, the probability of event will happen

  6. Bayes’ Theorem • Law of Total Probability • Let is an event in , if events form a partition of the events form a partition of and since they are disjoint, we have substituting with the formula of conditional probability, we obtain

  7. Bayes’ Thereom • Bayes’ Theorem • Relatively minor extension of definition of conditional probability • Compute from • The form is also known as Bayes’ Formula • Let events form the partition of the space, and , for ,

  8. Prior and Posterior Probability • Definition • Prior Probabilities the original probabilities of an outcome • Posterior Probabilities the probabilities we obtained after updating with new information from the experiment

  9. Prior Density Function • Prior Density Function • Let stand for the density function of , where is a random vector with range of • The function is called prior density function • represents our information about before the experiment

  10. Posterior Density Function • Posterior Density Function • The posterior density function of , given observed value , using the definition of conditional probability, we have In words,

  11. Markov Chain • Markov Chains • A stochastic process • Suppose that whenever the process is in state , there is a fixed probability that it will next be in state , which can be written as, • For a Markov chain, above equation states that the conditional distribution of any future state given the past states and the present state is independent of the past states and depends only on the present state

  12. Literature Review • Linear systems • Kalman Filter • Nonlinear systems • Extended Kalman Filter • Unscented Filter • Particle Filter • Bayesian filter • Monte Carlo Simulation • Sequential Importance Sampling • Sequential Importance Re-sampling • CONDENSATION algorithm

  13. Kalman Filter • Linear system-Kalman Filter • Recursive linear estimator • Applys only to Gaussian density • Algorithm • State-space model • Forward recursion • Smoothing • Diffuseness

  14. Kalman Filter as density propagation

  15. Kalman Filter • State-space model • A special case of the signal-plus-noise model • Under the assumption of signal-plus-noise model, as stands for the response vector, we have where the signal vector as the state vectors are assumed to propagate via state equations

  16. Kalman Filter • We write the state-space model as, • We derive the Best Linear Unbiased Prediction (BLUP) of based on (innovationvectors)as,

  17. Kalman Filter • Forward Recursions • Follow 2steps: 1. translatetheresponsevectors tothe innovationvectors 2. findtheBLUP of state vector and signal vector We get the forward recursion formula as

  18. Kalman Filter • Smoothing (Backward Recursion) • Including the information from new response data into predictors • The idea of smoothing is modifying the BLUP from being based on to being based on for some • How much new information we need to incorporate into the estimator ? Use the most information possible

  19. Kalman Filter • Diffuseness • Assume is a random vector with mean zero and variance-covariance matrix • The specific choice for have a profound effect on predictors • When we produce predictions which can be computed directly without specifying , we need to modify the recursions into diffuse Kalman Filter

  20. Nonlinear Systems • Nonlinear systems • Kalman Filter is not enough because most applications are presented in nonlinear systems • When observation density is non-Gaussian, the evolving state density is also generally non-Gaussian • Let the conditional density be a time-independent function

  21. Non-Gaussian State-density Propagation

  22. Nonlinear Systems • The rule for propagation of state density over time is is a normalization constant that does not depend on

  23. Nonlinear filtering • Apply nonlinear filter to evaluate the state density over time • Four distinct probability distributions represented in non-linear Bayesian Filter; three of them form part of the problem specification and fourth constitutes the solution • Three specified distributions are: • The prior density for the state • The process density that describes the stochastic dynamics • The observation density

  24. Nonlinear filtering • Interested in the 2nd type, the approach to this type of filtering is to approximate the dynamics as a linear process and proceed as for linear Kalman filter • The 4th type is simply to integrate the equation in previous slide directly, using a suitable numerical representation of the state density • Two filtering methods of 2nd type: • Extended Kalman Filter • Unscented Filter

  25. Extended Kalman Filter (EKF) • Extended Kalman Filter • The most common approach • Reliable for systems which are almost linear on the time scale of the update interval • Difficult to implement • Heavy computational work required • Algorithm scheme • to linearize all nonlinear models, then apply the traditional Kalman Filter

  26. Example of EKF • With linearization, the position where 1meter is, in reality it represents 96.7 cm. • In practice, the inconsistency can be resolved by introducing additional stabilizing noise which increase the size of the transformed covariance. The noise leads to biased estimates. • Why EKFs are difficult to tune ? Since sufficient noise is needed to offset the defects of linearization.

  27. Unscented Filter • Unscented filter • Based on the concept of the unscented transform • The mean is calculated to a higher order of accuracy than the EKF • The algorithm is suitable for any process model, and implementation is rapid (avoid the linearization computation as in EKF)

  28. Unscented Transform

  29. Example of Unscented Filter • The true mean lies at with a dotted covariance contour. • The unscented mean lies at with a solid contour. • The linearized mean lies at with a dashed contour. • The unscented mean value is the same as the true value. • The unscented transform is consistent.

  30. Particle Filter • Does not require the linearization of the relation between the state and the measurement • Maintains several hypotheses over time, and gives increased robustness • Develop our idea in following order • Bayesian filter • Monte Carlo Simulation • Sequential Importance Sampling • Sequential Importance Re-sampling • CONDENSATIONalgorithm

  31. Particle Filter • Bayesian filter • Considering the probabilistic inference problem in which the state variable set is estimated from the observed evidence , , the filtered pdf through recursive estimation is

  32. Particle Filter • Monte Carlo Simulation • The recursive estimation from Bayesian Filter needs strong assumptions to evaluate. This problem is resolved by using Monte Carlo methods. • Sequential Importance sampling • Avoid the difficulty to sampling directly from the posterior density by sampling from an proposal distribution. • The posterior function can be approximated well by drawing samples from a proposal distribution.

  33. Particle Filter • Sequential Importance Re-sampling • A re-sampling stage is used to prune those particles with negligible importance weights, and multiply those with higher ones. • A posterior density function is iteratively computed • This pdf undergoes a diffusion-reinforcement process, which is followed by factored sampling algorithm.

  34. Particle Filter • CONDENSATION algorithm (conditional density propagation for visual tracking) • A particular Particle Filtering method • Not necessary Gaussian • Theprobabilitydensitiesmustbeestablishedfordynamicoftheobjectandtheobservationprocess • Factor sampling • generate a random variables from a distribution that approximates the posterior • weight coefficients are decided after a sample set is generated from the prior density

  35. Steps in CONDENSATION algorithm • An element undergoes drift (deterministic step) • Identical elements in the new set undergo the same drift • Diffusion step : random and identical elements now split • The sample set with new time-step is generated without its weight • The observation step from factor sampling is applied, generating weights from observation density • The sample-set representation of state-density is obtained.

  36. Observationprocess • Thethicklineisahypothesisedshaped,representedasaparametricsplinecurve.

  37. Example: CONDENSATION • Trackingagilemotioninclutter

  38. Object tracking in video • Problem • Taking a real-time video on a moving object in certain period of time, tracking this object and marking it • Data • 60 consecutive frames are selected from 800 frames with dimension 240×320 image which extracted from a 55 second real-time video (running dog image) • 60 consecutive frames are offered by Toby Breckon from Matlab Central Forum (dropping ball image) • Method • Kalman Filter • Particle Filter • Environment • Matlab

  39. Results for Kalman Filter (data set 1)

  40. Results for Kalman Filter (data set 2)

  41. Results for Particle Filter (data set 1)

  42. Results for Particle Filter (data set 2)

  43. Discussion • Why did data set 1 (running dog) show less precision using Kalman Filter algorithm ? • Possible noise factor in data set 1 • absent of initial background images • non identical background( background changes along with the running motion) • multi moving object • Why we did not see the true position (green circle) in the images of Particle Filter for both data sets ? • First marking the true position as green circle, and second marking the predicted position. When the predicted position overlapped the true position, the true position concealed.

  44. Comparison

  45. Conclusion • Particle Filter is a superior algorithm than Kalman Filter in • the requirement of assumption • the ability to deal with noise in model • the accuracy of its prediction • The re-sampling stage in Particle Filter algorithm is considered to play a vital role in increasing the accuracy of the prediction. • The accuracy of prediction in Kalman Filter algorithm reduced when the motions of object is abrupt acceleration or bouncing. (lag effects) • The trait of data could be a factor to affect the prediction result.

  46. Future Research • Design appropriate models to cope with different types of data set • Multi object tracking • Moving object in non-identical background • Tracking in clutter • Comparison of implementation between Extended Kalman Filter, Unscented Filter, Kalman Filter and Particle Filter on real-time example

  47. Special thanks to • My thesis advisor Dr. Mohammad Kafai • My thesis committees Dr. Yitwah Cheung Dr. Alexandra Piryatinska • Computer Science Professor Dr. Kaz Okada

  48. Thanks for technical support from • Scott M. Shell Network Engineer • Allen Yen Telecommunication Engineer • MehranKafai Computer Science Ph.D candidate

  49. Thanks for your attending! The End.

More Related