Probabilistic object tracking for global
                                                            optimization




                                                              Dr.-Ing. Marcos Nieto Doncel
                                                              Investigador/Researcher
                                                              mnieto@vicomtech.org




Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
Outline


                         1. Introduction

                         2. Bayesian filtering

                         3. Particle filters
                             • Human tracking
                             • Multiple object tracking

                         4. MCMC
                             • iToll project

                         5. Conclusions




Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)   2
1.- Introduction
                       Object tracking in video-surveillance applications
                             Estimate properties of the imaged objects

                             Propagate knowledge through time

                             Multiple object tracking is a challenge

                                                             W

                           W


                                                H                    L
                                   H

                (x0,y0)                                    (x0,y0)




                                                                               3
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
2.- Bayesian filtering
                       Model the problem as a propagation of random variables
                        through time
                             Each property is represented by a random variable

                             The set of properties define the object at time t: state vector




                                                                                    W
                                         W


                                                H                                            H

                              (x0,y0)
                                                                               x0
                                                                                        y0




                                                                                                 4
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
2.- Bayesian filtering
                       Infererence: estimate the values of the state vector (reality)
                        based on a sequence of observations (images) applying
                        uncertainty models
                             Observation model: how the object is expected to appear in
                              images
                                   • Observation equation: p(zk|xk)


                             Dynamic model: what type of motion the object is expected to
                              show?
                                   • Dynamic equation: p(xk|xk-1)

                             Find posterior distribution p(xk|z1:k) and obtain a point-estimate
                              p(xk|z1:k) -> xk
                                   • Mean, robust-mean, mode, median, etc.



                                                                                                   5
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
2.- Bayesian filtering

                         K-1                     K                       K+1        TIME
   p(zk|xk): Observation model


                         zk-1                    zk                     zk+1    MEASUREMENTS
                                                                                (VISIBLE)




                                                                                   STATES
                          xk-1                       xk                  xk+1      (HIDDEN)



                                p(xk|xk-1): Dynamic model

                                                                                               6
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
2.- Bayesian filtering
                       Bayes’ rule
                             Combine observation and prediction models




                                   Observation                                 Prior

                             Under some assumptions, one can obtain the optimal solution to
                              this problem
                                   • Kalman filter if distributions are Gaussians and models are
                                     linear

                             However, typical video-surveillance problems are highly non-linear
                              and/or non-Gaussian
                                   • Sub-optimal solutions need to be computed

                                                                                                   7
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
3.- Particle filters

                       Particle filters
                             Sequential Monte Carlo (SMC) method, aka
                                   • Condensation algorithm, bootstrap filter, survival of the fittest…


                             It is a technique for implementing a recursive Bayesian
                              filter by representing the posterior density as a set of
                              samples or particles

                                                                 WEIGHTED        UNWEIGHTED




                                                                                                          8
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
3.- Particle filters
                       Understanding particles
                             Each particle represents a hypothesis of the state-vector

                             The set of particles represents the “reliability” of each region of the
                              space

                             The combination of particles lead to the best estimate


                                                                                    W
                                          W


                                                 H                                           H

                               (x0,y0)
                                                                               x0
                                                                                        y0




                                                                                                        9
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
3.- Particle filters
                       Importance sampling (weighted particles)
                             CONDENSATION, SIS, SIR




                                                                               10
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
Marcos Nieto, Carlos Cuevas and Luis Salgado, “Measurement-based Reclustering for
           Multiple Object Tracking with Particle Filters,” in IEEE Proc. International Conference on
           Image Processing (ICIP2009).




                       3.- Particle filters / Human tracking




                                                               ELLIPTICAL MODEL




                                                                                                        11
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
Marcos Nieto, Carlos Cuevas and Luis Salgado, “Measurement-based Reclustering for
           Multiple Object Tracking with Particle Filters,” in IEEE Proc. International Conference on
           Image Processing (ICIP2009).




                       3.- Particle filters / Human tracking
                        Observation model




                                Ratio between inside pixels and ellipse area
                                Ratio between inside and total pixels
                                Compactness around center of the ellipse




                                                                                                        12
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
Marcos Nieto, Carlos Cuevas and Luis Salgado, “Measurement-based Reclustering for
           Multiple Object Tracking with Particle Filters,” in IEEE Proc. International Conference on
           Image Processing (ICIP2009).




                       3.- Particle filters / Human tracking
                        Multiple objects




                                                                                                        13
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
Carlos R. del Blanco, Fernando Jaureguizar and Narciso García, “Visual Tracking of
           Multiple Interacting Objects Through Rao-Blackwellized Data Association Particle
           Filtering,” in IEEE Proc. International Conference on Image Processing (ICIP2010).




                      3.- Particle filters / Human tracking




                                                                                                14
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
R. Mohedano, N. García, “Robust Multi-Camera 3D Tracking from Mono-Camera 2D
           Tracking using Bayesian Association”, IEEE Trans. Consumer Electronics, vol. 56, no. 1,
           pp. 1-8, Feb. 2010.




                      3.- Particle filters / Human tracking




                                                                                                     15
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC
                       Approximation with unweighted particles
                             Markov Chain Monte Carlo (MCMC)

                             Metropolis-Hastings algorithm to generate a Markov Chain that
                              approximates to the posterior


                                                                               Metropolis-Hastings allows
                                                                               obtaining samples for an
                                                                               arbitrary distribution by making
                                                                               a chain which accepts or
                                                                               rejects samples




                                                                                                                  16
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC
                       Approximation with unweighted particles
                             MCMC methods improve the results obtained by importance
                              sampling strategies for high dimensional spaces

                             MCMC is therefore recommended to be used when the dimensions
                              of the problem increase



                             Metropolis-Hastings is the most typically used generic sampling
                              algorithm for MCMC



                             Other alternatives
                                   •   Slice sampler
                                   •   Gibbs sampler
                                   •   Levenberg-Marquardt




                                                                                                17
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC / Vehicle tracking
                       iToll project




                                                                               18
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC / Vehicle tracking
                       iToll project
                             Variable perspective

                             Variable vehicle sizes, appearance and motion

                             Adverse illumination and weather conditions

                             Real-time operation




                                                                               19
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC / Vehicle tracking




                                                                               20
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC / Vehicle tracking
                       Inferring 3D volume from 2D observations
                             There is a projective ambiguity that can not be solved analytically



                     There are 3D infinite
                     volumes that project onto
                      the same 2D shape
                     But only one is the right
                     one!


                             MCMC-based approach
                                   •   Combination of projective geometry constraints
                                   •   Temporal coherence
                                   •   Prior knowledge about vehicle configurations


                                                                                                    21
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC / Vehicle tracking




                                                                               22
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC / Vehicle tracking




                                                                               23
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
4.- MCMC / Vehicle tracking




                                                                               24
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
5.- Conclusions
                       Object tracking can be modelled as an probabilistic
                        inference problem
                             Uncertainty is mathematically handled

                             Potentially     any problem can be tackled like this!


                       Particle filters are a popular tool to solve non-linear and
                        analytically intractable inference problems
                             Importance sampling algorithms (CONDENSATION)



                       MCMC methods represents a step forward solving high-
                        dimensional problems
                             Optimization technique could be applied to reduce          the
                              computational complexity and allow real-time performance

                                                                                               25
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
Dr.-Ing. Marcos Nieto Doncel
                                      Investigador/Researcher
                                      mnieto@vicomtech.org


                                      http://marcosnieto.zymichost.com/




                                                                               26
Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)

Hoip10 presentación seguimiento de objetos_vicomtech

  • 1.
    Probabilistic object trackingfor global optimization Dr.-Ing. Marcos Nieto Doncel Investigador/Researcher mnieto@vicomtech.org Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 2.
    Outline 1. Introduction 2. Bayesian filtering 3. Particle filters • Human tracking • Multiple object tracking 4. MCMC • iToll project 5. Conclusions Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10) 2
  • 3.
    1.- Introduction  Object tracking in video-surveillance applications  Estimate properties of the imaged objects  Propagate knowledge through time  Multiple object tracking is a challenge W W H L H (x0,y0) (x0,y0) 3 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 4.
    2.- Bayesian filtering  Model the problem as a propagation of random variables through time  Each property is represented by a random variable  The set of properties define the object at time t: state vector W W H H (x0,y0) x0 y0 4 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 5.
    2.- Bayesian filtering  Infererence: estimate the values of the state vector (reality) based on a sequence of observations (images) applying uncertainty models  Observation model: how the object is expected to appear in images • Observation equation: p(zk|xk)  Dynamic model: what type of motion the object is expected to show? • Dynamic equation: p(xk|xk-1)  Find posterior distribution p(xk|z1:k) and obtain a point-estimate p(xk|z1:k) -> xk • Mean, robust-mean, mode, median, etc. 5 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 6.
    2.- Bayesian filtering K-1 K K+1 TIME p(zk|xk): Observation model zk-1 zk zk+1 MEASUREMENTS (VISIBLE) STATES xk-1 xk xk+1 (HIDDEN) p(xk|xk-1): Dynamic model 6 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 7.
    2.- Bayesian filtering  Bayes’ rule  Combine observation and prediction models Observation Prior  Under some assumptions, one can obtain the optimal solution to this problem • Kalman filter if distributions are Gaussians and models are linear  However, typical video-surveillance problems are highly non-linear and/or non-Gaussian • Sub-optimal solutions need to be computed 7 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 8.
    3.- Particle filters  Particle filters  Sequential Monte Carlo (SMC) method, aka • Condensation algorithm, bootstrap filter, survival of the fittest…  It is a technique for implementing a recursive Bayesian filter by representing the posterior density as a set of samples or particles WEIGHTED UNWEIGHTED 8 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 9.
    3.- Particle filters  Understanding particles  Each particle represents a hypothesis of the state-vector  The set of particles represents the “reliability” of each region of the space  The combination of particles lead to the best estimate W W H H (x0,y0) x0 y0 9 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 10.
    3.- Particle filters  Importance sampling (weighted particles)  CONDENSATION, SIS, SIR 10 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 11.
    Marcos Nieto, CarlosCuevas and Luis Salgado, “Measurement-based Reclustering for Multiple Object Tracking with Particle Filters,” in IEEE Proc. International Conference on Image Processing (ICIP2009). 3.- Particle filters / Human tracking ELLIPTICAL MODEL 11 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 12.
    Marcos Nieto, CarlosCuevas and Luis Salgado, “Measurement-based Reclustering for Multiple Object Tracking with Particle Filters,” in IEEE Proc. International Conference on Image Processing (ICIP2009). 3.- Particle filters / Human tracking  Observation model Ratio between inside pixels and ellipse area Ratio between inside and total pixels Compactness around center of the ellipse 12 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 13.
    Marcos Nieto, CarlosCuevas and Luis Salgado, “Measurement-based Reclustering for Multiple Object Tracking with Particle Filters,” in IEEE Proc. International Conference on Image Processing (ICIP2009). 3.- Particle filters / Human tracking  Multiple objects 13 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 14.
    Carlos R. delBlanco, Fernando Jaureguizar and Narciso García, “Visual Tracking of Multiple Interacting Objects Through Rao-Blackwellized Data Association Particle Filtering,” in IEEE Proc. International Conference on Image Processing (ICIP2010). 3.- Particle filters / Human tracking 14 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 15.
    R. Mohedano, N.García, “Robust Multi-Camera 3D Tracking from Mono-Camera 2D Tracking using Bayesian Association”, IEEE Trans. Consumer Electronics, vol. 56, no. 1, pp. 1-8, Feb. 2010. 3.- Particle filters / Human tracking 15 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 16.
    4.- MCMC  Approximation with unweighted particles  Markov Chain Monte Carlo (MCMC)  Metropolis-Hastings algorithm to generate a Markov Chain that approximates to the posterior Metropolis-Hastings allows obtaining samples for an arbitrary distribution by making a chain which accepts or rejects samples 16 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 17.
    4.- MCMC  Approximation with unweighted particles  MCMC methods improve the results obtained by importance sampling strategies for high dimensional spaces  MCMC is therefore recommended to be used when the dimensions of the problem increase  Metropolis-Hastings is the most typically used generic sampling algorithm for MCMC  Other alternatives • Slice sampler • Gibbs sampler • Levenberg-Marquardt 17 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 18.
    4.- MCMC /Vehicle tracking  iToll project 18 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 19.
    4.- MCMC /Vehicle tracking  iToll project  Variable perspective  Variable vehicle sizes, appearance and motion  Adverse illumination and weather conditions  Real-time operation 19 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 20.
    4.- MCMC /Vehicle tracking 20 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 21.
    4.- MCMC /Vehicle tracking  Inferring 3D volume from 2D observations  There is a projective ambiguity that can not be solved analytically There are 3D infinite volumes that project onto the same 2D shape But only one is the right one!  MCMC-based approach • Combination of projective geometry constraints • Temporal coherence • Prior knowledge about vehicle configurations 21 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 22.
    4.- MCMC /Vehicle tracking 22 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 23.
    4.- MCMC /Vehicle tracking 23 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 24.
    4.- MCMC /Vehicle tracking 24 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 25.
    5.- Conclusions  Object tracking can be modelled as an probabilistic inference problem  Uncertainty is mathematically handled  Potentially any problem can be tackled like this!  Particle filters are a popular tool to solve non-linear and analytically intractable inference problems  Importance sampling algorithms (CONDENSATION)  MCMC methods represents a step forward solving high- dimensional problems  Optimization technique could be applied to reduce the computational complexity and allow real-time performance 25 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)
  • 26.
    Dr.-Ing. Marcos NietoDoncel Investigador/Researcher mnieto@vicomtech.org http://marcosnieto.zymichost.com/ 26 Marcos Nieto (mnieto@vicomtech.org) Hands-on Image Processing 2010 (HOIP’10)