-
Notifications
You must be signed in to change notification settings - Fork 134
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
Adding an example showing inverse-time dynamics method to deal with OOSM #940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly grammatical changes. Please also see comment on line 352 for a suggested change to help present the results more effectively.
# multiple approaches on how to deal with OOS measurements, | ||
# spanning from simply ignoring them, assuming that the fraction | ||
# of these is small and it will not, significally, impact the quality of the | ||
# tracking, iterate over last $\math{\ell}$ measurements with | ||
# a fixed lag (see what it is called Algorithm A and B in [#]_ and | ||
# [#]_, see also the previous examples) or, like in this example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# multiple approaches on how to deal with OOS measurements, | |
# spanning from simply ignoring them, assuming that the fraction | |
# of these is small and it will not, significally, impact the quality of the | |
# tracking, iterate over last $\math{\ell}$ measurements with | |
# a fixed lag (see what it is called Algorithm A and B in [#]_ and | |
# [#]_, see also the previous examples) or, like in this example, | |
# multiple approaches on how to deal with OOS measurements. | |
# These approaches include simply ignoring the presence of | |
# OOSM (assuming that the fraction of OOSM is small and it will | |
# not significantly impact the tracking performance). Another | |
# approach iterates over last $\math{\ell}$ measurements with | |
# a fixed lag (see what it is called Algorithm A and B in [#]_ and | |
# [#]_ (see the previous examples). In this example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fill in the reference numbers in the text above
# you can include any OOSM and re-process the measurement using | ||
# inverse-time dynamics creating pseudo-measurements. | ||
# This approach is called in literature as Algorithm C | ||
# (from [#]_, [#]_) and it will be refered as such later on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference numbers
# To explain how does it work let's consider a single target scenario, | ||
# this algorithm deals with the presence of delayed measurements by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# To explain how does it work let's consider a single target scenario, | |
# this algorithm deals with the presence of delayed measurements by | |
# To explain how it works, we consider a single target scenario. | |
# This algorithm deals with the presence of delayed measurements by |
# and with some level of clutter, at specific timesteps we insert a | ||
# delay in one of the sensor scan and we employ Algorithm C to | ||
# process in the correct way the chain of measurements. | ||
# To visualise the benefit of the algorithm we, also, include a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# To visualise the benefit of the algorithm we, also, include a | |
# To visualise the benefit of the algorithm, we also include a |
# ------------------------------------------------------------------- | ||
# We can now run the tracker and generate the tracks. | ||
# By looping over the scans we can spot any OOS measurement and apply the algorithm. | ||
# When we encounter a delayed measurement, at time $\math{\tau}$, we make use of both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# When we encounter a delayed measurement, at time $\math{\tau}$, we make use of both | |
# When we encounter a delayed measurement, at time :math:`\tau`, we make use of both |
# target, then we use the transition model with time-inverse dynamics ($t_{k} - \math{\tau}$) | ||
# to trace back where the target was in the scan-timestamp ($t$). With this pseudo-location, which is an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# target, then we use the transition model with time-inverse dynamics ($t_{k} - \math{\tau}$) | |
# to trace back where the target was in the scan-timestamp ($t$). With this pseudo-location, which is an | |
# target, then we use the transition model with time-inverse dynamics (:math:`t_{k} - \tau`) | |
# to trace back where the target was in the scan-timestamp :math:`t`. With this pseudo-location, which is an |
# inverse function at $\math{\tau}$ to obtain a predicted Cartesian location of the | ||
# target, then we use the transition model with time-inverse dynamics ($t_{k} - \math{\tau}$) | ||
# to trace back where the target was in the scan-timestamp ($t$). With this pseudo-location, which is an | ||
# approximation, we can compute the pseudo-measurement usign the measurement model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# approximation, we can compute the pseudo-measurement usign the measurement model. | |
# approximation, we can compute the pseudo-measurement using the measurement model. |
# target, then we use the transition model with time-inverse dynamics ($t_{k} - \math{\tau}$) | ||
# to trace back where the target was in the scan-timestamp ($t$). With this pseudo-location, which is an | ||
# approximation, we can compute the pseudo-measurement usign the measurement model. | ||
# In this way now we have a pseudo-measurement at $t$ and we can keep the time-chain and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# In this way now we have a pseudo-measurement at $t$ and we can keep the time-chain and | |
# In this way now we have a pseudo-measurement at :math:`t` and we can keep the time-chain and |
# ------------------------------------------------------------------------ | ||
# We have obtained the final tracks from the detections and we have two sets of | ||
# tracks, one with OOSM and one without. We now can visualise the results | ||
# and evaluate the track-to-truh accuracy using the OSPA metric tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# and evaluate the track-to-truh accuracy using the OSPA metric tool. | |
# and evaluate the track-to-track accuracy using the OSPA metric tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions to improve grammar and readability but otherwise looks good!
from stonesoup.plotter import AnimatedPlotterly | ||
plotter = AnimatedPlotterly(timesteps=timestamps) | ||
plotter.plot_ground_truths(truths, [0, 2]) | ||
plotter.plot_measurements(scan_s1, [0, 2], measurements_label='scan1', measurement_model=sensor_1_mm) | ||
plotter.plot_measurements(scan_s2, [0, 2], measurements_label='scan2', measurement_model=sensor_1_mm) | ||
plotter.plot_tracks(oosm_tracks, [0, 2], track_label='OOSM Tracks', | ||
line= dict(color='orange')) | ||
plotter.plot_tracks(noOsm_tracks, [0, 2], track_label='no-OOSM Tracks', | ||
line= dict(color='red')) | ||
plotter.fig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TrueDetection
s plotted in your output (blue points) look pretty noisy and a long way from the ground truth towards the end of the simulation. Ignore me if that's intentional, but might be worth adjusting the noise in your measurement model if not.
Thir PR adds an example that shows how to implement Algorithm C [1, 2] to deal with out of sequence measurements.
As other examples (see PR #939 and PR #915 ) we explain how to treat OOSM, in this specific case we employ a time-inverse dynamics method to create pseudo-measurements at "correct timestamp" from the delayed detections.
[1] Y. Bar-Shalom, M. Mallick, H. Chen, R. Washburn, 2002, One-step solution for the general out-of-sequence measurement problem in tracking, Proceedings of the 2002 IEEE Aerospace Conference.
[2] S. R. Maskell, R. G. Everitt, R. Wright, M. Briers, 2005, Multi-target out-of-sequence data association: Tracking using graphical models, Information Fusion.