Trackers¶
-
class
stonesoup.tracker.base.
Tracker
[source]¶ Bases:
stonesoup.base.Base
,stonesoup.buffered_generator.BufferedGenerator
Tracker base class
-
abstract
tracks_gen
()[source]¶ Returns a generator of tracks for each time step.
- Yields
datetime.datetime
– Datetime of current time stepset of
Track
– Tracks existing in the time step
-
abstract
-
class
stonesoup.tracker.simple.
SingleTargetTracker
(initiator: Initiator, deleter: Deleter, detector: DetectionReader, data_associator: DataAssociator, updater: Updater)[source]¶ Bases:
stonesoup.tracker.base.Tracker
A simple single target tracker.
Track a single object using Stone Soup components. The tracker works by first calling the
data_associator
with the active track, and then either updating the track state with the result of theupdater
if a detection is associated, or with the prediction if no detection is associated to the track. The track is then checked for deletion by thedeleter
, and if deleted theinitiator
is called to generate a new track. Similarly if no track is present (i.e. tracker is initialised or deleted in previous iteration), only theinitiator
is called.- Parameters
initiator (
Initiator
) – Initiator used to initialise the track.deleter (
Deleter
) – Deleter used to delete the trackdetector (
DetectionReader
) – Detector used to generate detection objects.data_associator (
DataAssociator
) – Association algorithm to pair predictions to detectionsupdater (
Updater
) – Updater used to update the track object to the new state.
-
initiator
: stonesoup.initiator.base.Initiator¶ Initiator used to initialise the track.
-
deleter
: stonesoup.deleter.base.Deleter¶ Deleter used to delete the track
-
detector
: stonesoup.reader.base.DetectionReader¶ Detector used to generate detection objects.
-
data_associator
: stonesoup.dataassociator.base.DataAssociator¶ Association algorithm to pair predictions to detections
-
updater
: stonesoup.updater.base.Updater¶ Updater used to update the track object to the new state.
-
tracks_gen
()[source]¶ Returns a generator of tracks for each time step.
- Yields
datetime.datetime
– Datetime of current time stepset of
Track
– Tracks existing in the time step
-
class
stonesoup.tracker.simple.
MultiTargetTracker
(initiator: Initiator, deleter: Deleter, detector: DetectionReader, data_associator: DataAssociator, updater: Updater)[source]¶ Bases:
stonesoup.tracker.base.Tracker
A simple multi target tracker.
Track multiple objects using Stone Soup components. The tracker works by first calling the
data_associator
with the active tracks, and then either updating the track state with the result of theupdater
if a detection is associated, or with the prediction if no detection is associated to the track. Tracks are then checked for deletion by thedeleter
, and remaining unassociated detections are passed to theinitiator
to generate new tracks.- Parameters
initiator (
Initiator
) – Initiator used to initialise the track.deleter (
Deleter
) – Initiator used to initialise the track.detector (
DetectionReader
) – Detector used to generate detection objects.data_associator (
DataAssociator
) – Association algorithm to pair predictions to detectionsupdater (
Updater
) – Updater used to update the track object to the new state.
-
initiator
: stonesoup.initiator.base.Initiator¶ Initiator used to initialise the track.
-
deleter
: stonesoup.deleter.base.Deleter¶ Initiator used to initialise the track.
-
detector
: stonesoup.reader.base.DetectionReader¶ Detector used to generate detection objects.
-
data_associator
: stonesoup.dataassociator.base.DataAssociator¶ Association algorithm to pair predictions to detections
-
updater
: stonesoup.updater.base.Updater¶ Updater used to update the track object to the new state.
-
tracks_gen
()[source]¶ Returns a generator of tracks for each time step.
- Yields
datetime.datetime
– Datetime of current time stepset of
Track
– Tracks existing in the time step
-
class
stonesoup.tracker.simple.
MultiTargetMixtureTracker
(initiator: Initiator, deleter: Deleter, detector: DetectionReader, data_associator: DataAssociator, updater: Updater)[source]¶ Bases:
stonesoup.tracker.base.Tracker
A simple multi target tracker that receives associations from a (Gaussian) Mixture associator.
Track multiple objects using Stone Soup components. The tracker works by first calling the
data_associator
with the active tracks, and then either updating the track state with the result of thedata_associator
that reduces the (Gaussian) Mixture of all possible track-detection associations, or with the prediction if no detection is associated to the track. Tracks are then checked for deletion by thedeleter
, and remaining unassociated detections are passed to theinitiator
to generate new tracks.- Parameters
initiator (
Initiator
) – Initiator used to initialise the track.deleter (
Deleter
) – Initiator used to initialise the track.detector (
DetectionReader
) – Detector used to generate detection objects.data_associator (
DataAssociator
) – Association algorithm to pair predictions to detectionsupdater (
Updater
) – Updater used to update the track object to the new state.
-
initiator
: stonesoup.initiator.base.Initiator¶ Initiator used to initialise the track.
-
deleter
: stonesoup.deleter.base.Deleter¶ Initiator used to initialise the track.
-
detector
: stonesoup.reader.base.DetectionReader¶ Detector used to generate detection objects.
-
data_associator
: stonesoup.dataassociator.base.DataAssociator¶ Association algorithm to pair predictions to detections
-
updater
: stonesoup.updater.base.Updater¶ Updater used to update the track object to the new state.
-
tracks_gen
()[source]¶ Returns a generator of tracks for each time step.
- Yields
datetime.datetime
– Datetime of current time stepset of
Track
– Tracks existing in the time step
Point Process¶
-
class
stonesoup.tracker.pointprocess.
PointProcessMultiTargetTracker
(detector: DetectionReader, updater: Updater, hypothesiser: GaussianMixtureHypothesiser, reducer: GaussianMixtureReducer, extraction_threshold: Probability = 0.9, birth_component: TaggedWeightedGaussianState = None)[source]¶ Bases:
stonesoup.tracker.base.Tracker
Base class for Gaussian Mixture (GM) style implementations of point process derived filters
- Parameters
detector (
DetectionReader
) – Detector used to generate detection objects.updater (
Updater
) – Updater used to update the objects to their new state.hypothesiser (
GaussianMixtureHypothesiser
) – Association algorithm to pair predictions to detectionsreducer (
GaussianMixtureReducer
) – Reducer used to reduce the number of components in the mixture.extraction_threshold (
Probability
, optional) – Threshold to extract components from the mixture.birth_component (
TaggedWeightedGaussianState
, optional) – The birth component. The weight should be equal to the mean of the expected number of births per timestep (Poission distributed)
-
detector
: stonesoup.reader.base.DetectionReader¶ Detector used to generate detection objects.
-
updater
: stonesoup.updater.base.Updater¶ Updater used to update the objects to their new state.
-
hypothesiser
: stonesoup.hypothesiser.gaussianmixture.GaussianMixtureHypothesiser¶ Association algorithm to pair predictions to detections
-
reducer
: stonesoup.mixturereducer.gaussianmixture.GaussianMixtureReducer¶ Reducer used to reduce the number of components in the mixture.
-
extraction_threshold
: stonesoup.types.numeric.Probability¶ Threshold to extract components from the mixture.
-
birth_component
: stonesoup.types.state.TaggedWeightedGaussianState¶ The birth component. The weight should be equal to the mean of the expected number of births per timestep (Poission distributed)
-
update_tracks
()[source]¶ Updates the tracks (
Track
) associated with the filter.- Parameters
self (
GaussianMixtureMultiTargetTracker
) – Current GM Multi Target Tracker at time \(k\)
Note
Each track shares a unique tag with its associated component
-
tracks_gen
()[source]¶ Returns a generator of tracks for each time step.
- Yields
datetime.datetime
– Datetime of current time stepset of
Track
– Tracks existing in the time step
-
end_tracks
()[source]¶ Ends the tracks (
Track
) that do not have an associated component within the filter.- Parameters
self (
GaussianMixtureMultiTargetTracker
) – Current GM Multi Target Tracker at time \(k\)
-
property
extracted_target_states
¶ Extract all target states from the Gaussian Mixture that are above an extraction threshold.
-
property
estimated_number_of_targets
¶ The number of hypothesised targets.