SlideShare una empresa de Scribd logo
1 de 56
Computer vision: models,
 learning and inference
           Chapter 19
         Temporal models



   Please send errata to s.prince@cs.ucl.ac.uk
Goal




To track object state from frame to frame in a video

Difficulties:
    • Clutter (data association)
    • One image may not be enough to fully define state
    • Relationship between frames may be complicated
Structure

•   Temporal models
•   Kalman filter
•   Extended Kalman filter
•   Unscented Kalman filter
•   Particle filters
•   Applications


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   3
Temporal Models
•   Consider an evolving system
•   Represented by an unknown vector, w
•   This is termed the state
•   Examples:
    – 2D Position of tracked object in image
    – 3D Pose of tracked object in world
    – Joint positions of articulated model
• OUR GOAL: To compute the marginal
  posterior distribution over w at time t.
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   4
Estimating State
Two contributions to estimating the state:
1. A set of measurements xt, which provide
   information about the state wt at time t. This is a
   generative model: the measurements are derived
   from the state using a known probability relation
   Pr(xt|w1…wT)
2. A time series model, which says something about
   the expected way that the system will evolve e.g.,
   Pr(wt|w1...wt-1,wt+1…wT)

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   5
Assumptions
• Only the immediate past matters (Markov)
  – the probability of the state at time t is conditionally
    independent of states at times 1...t-2 given the state
    at time t-1.

• Measurements depend on only the current state
  – the likelihood of the measurements at time t is
    conditionally independent of all of the other
    measurements and the states at times 1...t-1, t+1..t
    given the state at time t.

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   6
Graphical Model
World states




Measurements
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   7
Recursive Estimation
Time 1



Time 2



                                                                                      from
Time t                                                                              temporal
                                                                                     model


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince        8
Computing the prior (time evolution)

Each time, the prior is based on the Chapman-Kolmogorov
equation




Prior at time t                  Temporal model                                  Posterior at
                                                                                  time t-1

             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince           9
Summary
Alternate between:

Temporal Evolution                                          Temporal model




Measurement Update                                       Measurement model




        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   10
Structure

•   Temporal models
•   Kalman filter
•   Extended Kalman filter
•   Unscented Kalman filter
•   Particle filters
•   Applications


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   11
Kalman Filter
The Kalman filter is just a special case of this type of
recursive estimation procedure.

Temporal model and measurement model carefully
chosen so that if the posterior at time t-1 was Gaussian
then the

• prior at time t will be Gaussian
• posterior at time t will be Gaussian

The Kalman filter equations are rules for updating the
   means and covariances of these Gaussians
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   12
The Kalman Filter



Previous time step                            Prediction




Measurement likelihood                         Combination
   Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   13
Kalman Filter Definition
Time evolution equation




                             State transition matrix                         Additive Gaussian noise

Measurement equation



                                                                           Additive Gaussian noise
                       Relates state and measurement
       Computer vision: models, learning and inference. ©2011 Simon J.D. Prince                 14
Kalman Filter Definition
Time evolution equation




                             State transition matrix                         Additive Gaussian noise

Measurment equation



                                                                           Additive Gaussian noise
                       Relates state and measurement
       Computer vision: models, learning and inference. ©2011 Simon J.D. Prince                 15
Temporal evolution




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   16
Measurement incorporation




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   17
Kalman Filter



This is not the usual way these equations are presented.

Part of the reason for this is the size of the inverses: is usually
landscape and so T is inefficient

Define Kalman gain:


             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   18
Mean Term




Using Matrix inversion relations:




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   19
Covariance Term
Kalman Filter




Using Matrix inversion relations:




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   20
Final Kalman Filter Equation




Innovation (difference between
actual and predicted measurements
                                                            Prior variance minus a term due
                                                            to information from
                                                            measurement


            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince          21
Kalman Filter Summary
Time evolution equation


Measurement equation


Inference




       Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   22
Kalman Filter Example 1




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   23
Kalman Filter Example 2




Alternates:


              Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   24
Smoothing
• Estimates depend only on measurements up to the current point in time.
• Sometimes want to estimate state based on future measurements as well

Fixed Lag Smoother:

This is an on-line scheme in which the optimal estimate for a state at time t -t
   is calculated based on measurements up to time t, where t is the time lag.
   i.e. we wish to calculate Pr(wt- |x1 . . .xt ).

Fixed Interval Smoother:

We have a fixed time interval of measurements and want to calculate the
  optimal state estimate based on all of these measurements. In other words,
  instead of calculating Pr(wt |x1 . . .xt ) we now estimate Pr(wt |x1 . . .xT)
  where T is the total length of the interval.

               Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   25
Fixed lag smoother
 State evolution equation




 Estimate
delayed by

 Measurement equation




             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   26
Fixed-lag Kalman Smoothing




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   27
Fixed interval smoothing

Backward set of recursions




where



 Equivalent to belief propagation / forward-backward algorithm



         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   28
Temporal Models




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   29
Problems with the Kalman filter
• Requires linear temporal and measurement
  equations

• Represents result as a normal distribution:
  what if the posterior is genuinely multi-
  modal?



         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   30
Structure

•   Temporal models
•   Kalman filter
•   Extended Kalman filter
•   Unscented Kalman filter
•   Particle filters
•   Applications


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   31
Roadmap




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   32
Extended Kalman Filter
Allows non-linear measurement and temporal equations




Key idea: take Taylor expansion and treat as locally linear




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   33
Jacobians
Based on Jacobians matrices of derivatives




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   34
Extended Kalman Filter Equations




     Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   35
Extended Kalman Filter




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   36
Problems with EKF




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   37
Structure

•   Temporal models
•   Kalman filter
•   Extended Kalman filter
•   Unscented Kalman filter
•   Particle filters
•   Applications


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   38
Unscented Kalman Filter
Key ideas:

• Approximate distribution as a sum of weighted particles
  with correct mean and covariance

• Pass particles through non-linear function of the form



• Compute mean and covariance of transformed variables


         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   39
Unscented Kalman Filter
Approximate with particles:




Choose so that




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   40
One possible scheme




With:



   Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   41
Reconstitution




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   42
Unscented Kalman Filter




 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   43
Measurement incorportation
Measurement incorporation works in a similar way:
Approximate predicted distribution by set of particles




Particles chosen so that mean and covariance the same




        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   44
Measurement incorportation
Pass particles through measurement equationand
recompute mean and variance:




Measurement update equations:



Kalman gain now computed from particles:



        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   45
Problems with UKF




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   46
Structure

•   Temporal models
•   Kalman filter
•   Extended Kalman filter
•   Unscented Kalman filter
•   Particle filters
•   Applications


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   47
Particle filters
Key idea:

   • Represent probability distribution as a set of
     weighted particles




Advantages and disadvantages:

   + Can represent non-Gaussian multimodal densities
   + No need for data association
   - Expensive

            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   48
Condensation Algorithm
Stage 1: Resample from weighted particles according to their
weight to get unweighted particles




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   49
Condensation Algorithm
Stage 2: Pass unweighted samples through temporal model
and add noise




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   50
Condensation Algorithm
Stage 3: Weight samples by measurement density




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   51
Data Association




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   52
Structure

•   Temporal models
•   Kalman filter
•   Extended Kalman filter
•   Unscented Kalman filter
•   Particle filters
•   Applications


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   53
Tracking pedestrians




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   54
Tracking contour in clutter




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   55
Simultaneous localization and mapping




      Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   56

Más contenido relacionado

Similar a 19 cv mil_temporal_models

07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densitieszukun
 
11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_treeszukun
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformationszukun
 
17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shapezukun
 
16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameraszukun
 
Graphical Models for chains, trees and grids
Graphical Models for chains, trees and gridsGraphical Models for chains, trees and grids
Graphical Models for chains, trees and gridspotaters
 
14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camera14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camerazukun
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regressionzukun
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inferencezukun
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_modelszukun
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributionszukun
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessingzukun
 
02 cv mil_intro_to_probability
02 cv mil_intro_to_probability02 cv mil_intro_to_probability
02 cv mil_intro_to_probabilityzukun
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_wordszukun
 
Lecture notes
Lecture notesLecture notes
Lecture notesbutest
 
Kalman filter(nanheekim)
Kalman filter(nanheekim)Kalman filter(nanheekim)
Kalman filter(nanheekim)Nanhee Kim
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distributionzukun
 
Introduction to Probability
Introduction to ProbabilityIntroduction to Probability
Introduction to ProbabilityLukas Tencer
 

Similar a 19 cv mil_temporal_models (18)

07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
 
11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformations
 
17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shape
 
16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameras
 
Graphical Models for chains, trees and grids
Graphical Models for chains, trees and gridsGraphical Models for chains, trees and grids
Graphical Models for chains, trees and grids
 
14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camera14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camera
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regression
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessing
 
02 cv mil_intro_to_probability
02 cv mil_intro_to_probability02 cv mil_intro_to_probability
02 cv mil_intro_to_probability
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_words
 
Lecture notes
Lecture notesLecture notes
Lecture notes
 
Kalman filter(nanheekim)
Kalman filter(nanheekim)Kalman filter(nanheekim)
Kalman filter(nanheekim)
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distribution
 
Introduction to Probability
Introduction to ProbabilityIntroduction to Probability
Introduction to Probability
 

Más de zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVzukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Informationzukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statisticszukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibrationzukun
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionzukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluationzukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-softwarezukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectorszukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-introzukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video searchzukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video searchzukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learningzukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionzukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick startzukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysiszukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structureszukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities zukun
 

Más de zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Último (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

19 cv mil_temporal_models

  • 1. Computer vision: models, learning and inference Chapter 19 Temporal models Please send errata to s.prince@cs.ucl.ac.uk
  • 2. Goal To track object state from frame to frame in a video Difficulties: • Clutter (data association) • One image may not be enough to fully define state • Relationship between frames may be complicated
  • 3. Structure • Temporal models • Kalman filter • Extended Kalman filter • Unscented Kalman filter • Particle filters • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3
  • 4. Temporal Models • Consider an evolving system • Represented by an unknown vector, w • This is termed the state • Examples: – 2D Position of tracked object in image – 3D Pose of tracked object in world – Joint positions of articulated model • OUR GOAL: To compute the marginal posterior distribution over w at time t. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4
  • 5. Estimating State Two contributions to estimating the state: 1. A set of measurements xt, which provide information about the state wt at time t. This is a generative model: the measurements are derived from the state using a known probability relation Pr(xt|w1…wT) 2. A time series model, which says something about the expected way that the system will evolve e.g., Pr(wt|w1...wt-1,wt+1…wT) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5
  • 6. Assumptions • Only the immediate past matters (Markov) – the probability of the state at time t is conditionally independent of states at times 1...t-2 given the state at time t-1. • Measurements depend on only the current state – the likelihood of the measurements at time t is conditionally independent of all of the other measurements and the states at times 1...t-1, t+1..t given the state at time t. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6
  • 7. Graphical Model World states Measurements Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 7
  • 8. Recursive Estimation Time 1 Time 2 from Time t temporal model Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 8
  • 9. Computing the prior (time evolution) Each time, the prior is based on the Chapman-Kolmogorov equation Prior at time t Temporal model Posterior at time t-1 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 9
  • 10. Summary Alternate between: Temporal Evolution Temporal model Measurement Update Measurement model Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10
  • 11. Structure • Temporal models • Kalman filter • Extended Kalman filter • Unscented Kalman filter • Particle filters • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 11
  • 12. Kalman Filter The Kalman filter is just a special case of this type of recursive estimation procedure. Temporal model and measurement model carefully chosen so that if the posterior at time t-1 was Gaussian then the • prior at time t will be Gaussian • posterior at time t will be Gaussian The Kalman filter equations are rules for updating the means and covariances of these Gaussians Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 12
  • 13. The Kalman Filter Previous time step Prediction Measurement likelihood Combination Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13
  • 14. Kalman Filter Definition Time evolution equation State transition matrix Additive Gaussian noise Measurement equation Additive Gaussian noise Relates state and measurement Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14
  • 15. Kalman Filter Definition Time evolution equation State transition matrix Additive Gaussian noise Measurment equation Additive Gaussian noise Relates state and measurement Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15
  • 16. Temporal evolution Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16
  • 17. Measurement incorporation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 17
  • 18. Kalman Filter This is not the usual way these equations are presented. Part of the reason for this is the size of the inverses: is usually landscape and so T is inefficient Define Kalman gain: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 18
  • 19. Mean Term Using Matrix inversion relations: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 19
  • 20. Covariance Term Kalman Filter Using Matrix inversion relations: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 20
  • 21. Final Kalman Filter Equation Innovation (difference between actual and predicted measurements Prior variance minus a term due to information from measurement Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21
  • 22. Kalman Filter Summary Time evolution equation Measurement equation Inference Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22
  • 23. Kalman Filter Example 1 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23
  • 24. Kalman Filter Example 2 Alternates: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24
  • 25. Smoothing • Estimates depend only on measurements up to the current point in time. • Sometimes want to estimate state based on future measurements as well Fixed Lag Smoother: This is an on-line scheme in which the optimal estimate for a state at time t -t is calculated based on measurements up to time t, where t is the time lag. i.e. we wish to calculate Pr(wt- |x1 . . .xt ). Fixed Interval Smoother: We have a fixed time interval of measurements and want to calculate the optimal state estimate based on all of these measurements. In other words, instead of calculating Pr(wt |x1 . . .xt ) we now estimate Pr(wt |x1 . . .xT) where T is the total length of the interval. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25
  • 26. Fixed lag smoother State evolution equation Estimate delayed by Measurement equation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26
  • 27. Fixed-lag Kalman Smoothing Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27
  • 28. Fixed interval smoothing Backward set of recursions where Equivalent to belief propagation / forward-backward algorithm Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 28
  • 29. Temporal Models Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 29
  • 30. Problems with the Kalman filter • Requires linear temporal and measurement equations • Represents result as a normal distribution: what if the posterior is genuinely multi- modal? Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 30
  • 31. Structure • Temporal models • Kalman filter • Extended Kalman filter • Unscented Kalman filter • Particle filters • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 31
  • 32. Roadmap Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 32
  • 33. Extended Kalman Filter Allows non-linear measurement and temporal equations Key idea: take Taylor expansion and treat as locally linear Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 33
  • 34. Jacobians Based on Jacobians matrices of derivatives Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 34
  • 35. Extended Kalman Filter Equations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 35
  • 36. Extended Kalman Filter Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 36
  • 37. Problems with EKF Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 37
  • 38. Structure • Temporal models • Kalman filter • Extended Kalman filter • Unscented Kalman filter • Particle filters • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 38
  • 39. Unscented Kalman Filter Key ideas: • Approximate distribution as a sum of weighted particles with correct mean and covariance • Pass particles through non-linear function of the form • Compute mean and covariance of transformed variables Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 39
  • 40. Unscented Kalman Filter Approximate with particles: Choose so that Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 40
  • 41. One possible scheme With: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 41
  • 42. Reconstitution Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 42
  • 43. Unscented Kalman Filter Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 43
  • 44. Measurement incorportation Measurement incorporation works in a similar way: Approximate predicted distribution by set of particles Particles chosen so that mean and covariance the same Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 44
  • 45. Measurement incorportation Pass particles through measurement equationand recompute mean and variance: Measurement update equations: Kalman gain now computed from particles: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 45
  • 46. Problems with UKF Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 46
  • 47. Structure • Temporal models • Kalman filter • Extended Kalman filter • Unscented Kalman filter • Particle filters • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 47
  • 48. Particle filters Key idea: • Represent probability distribution as a set of weighted particles Advantages and disadvantages: + Can represent non-Gaussian multimodal densities + No need for data association - Expensive Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 48
  • 49. Condensation Algorithm Stage 1: Resample from weighted particles according to their weight to get unweighted particles Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 49
  • 50. Condensation Algorithm Stage 2: Pass unweighted samples through temporal model and add noise Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 50
  • 51. Condensation Algorithm Stage 3: Weight samples by measurement density Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 51
  • 52. Data Association Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 52
  • 53. Structure • Temporal models • Kalman filter • Extended Kalman filter • Unscented Kalman filter • Particle filters • Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 53
  • 54. Tracking pedestrians Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 54
  • 55. Tracking contour in clutter Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 55
  • 56. Simultaneous localization and mapping Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 56