Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth trajectories using Kalman filters #10

Open
niksirbi opened this issue Mar 14, 2023 · 7 comments
Open

Smooth trajectories using Kalman filters #10

niksirbi opened this issue Mar 14, 2023 · 7 comments
Assignees
Labels
enhancement New optional feature

Comments

@niksirbi
Copy link
Member

@joacorapela showed me some really neat ways of filtering and smoothing trajectories (position, velocity, and acceleration). It is based on linear dynamical systems and Kalman filters, deals nicely with missing data, and also works in real-time (for closed-loop experiments). Joaquin's implementation currently lives in this repo. I plan to port some of the classes and functions to movement, and implement them as an option for preprocessing tracks.

@niksirbi niksirbi self-assigned this Mar 14, 2023
@niksirbi niksirbi added the core feature a core functionality that must be implemented label Mar 14, 2023
@niksirbi niksirbi moved this from 🤔 Triage to 📝 Todo in movement progress tracker Mar 14, 2023
@niksirbi niksirbi added this to the v1.0 (1st stable release) milestone Mar 14, 2023
@niksirbi
Copy link
Member Author

niksirbi commented Apr 6, 2023

A great resource on Kalman filters: https://www.kalmanfilter.net/
I could base the implementation (and the variable names) on that.

@niksirbi niksirbi moved this from 📝 Todo to 🚧 In Progress in movement progress tracker Jun 9, 2023
@niksirbi
Copy link
Member Author

niksirbi commented Aug 8, 2023

Some preliminary work in the kalman-filter branch

@niksirbi niksirbi moved this from 🚧 In Progress to 📝 Todo in movement progress tracker Sep 19, 2023
@niksirbi
Copy link
Member Author

niksirbi commented Oct 2, 2023

@niksirbi niksirbi removed this from the v1.0 (1st stable release) milestone Oct 16, 2023
@niksirbi
Copy link
Member Author

@bendichter made me aware of this pull request to add Kalman filter to scikit-learn (10 years ago!). Scikit-learn devs opted to not add it, for various reasons given in that PR. That's how the pykalman package got born actually. The discussion there is absolutely worth a read!

@niksirbi niksirbi added enhancement New optional feature and removed core feature a core functionality that must be implemented labels Mar 21, 2024
@niksirbi
Copy link
Member Author

niksirbi commented May 2, 2024

Also check out the implementation in sort (for tracking bounding boxes).

@niksirbi
Copy link
Member Author

In discussion today, @edeno mentioned that a linear Newtonial Kalman Filter may be insufficient, because it will have some lags, and suggested using an Extended Kalman Filter.

He also mentioned dynamax as a good repository of implementations for probabilistic state-space models.

@niksirbi
Copy link
Member Author

niksirbi commented Sep 6, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New optional feature
Projects
Status: 🤔 Triage
Development

No branches or pull requests

3 participants