Trackers
- class stonesoup.tracker.simple.SingleTargetTracker(initiator: Initiator, deleter: Deleter, detector: DetectionReader, data_associator: DataAssociator, updater: Updater)[source]
Bases:
_TrackerMixInNext,TrackerA simple single target tracker.
Track a single object using Stone Soup components. The tracker works by first calling the
data_associatorwith the active track, and then either updating the track state with the result of theupdaterif 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 theinitiatoris called to generate a new track. Similarly if no track is present (i.e. tracker is initialised or deleted in previous iteration), only theinitiatoris called.- Parameters:
initiator (
Initiator) – Initiator used to initialise the track.deleter (
Deleter) – Deleter used to delete tracks.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.
- detector: DetectionReader
Detector used to generate detection objects.
- data_associator: DataAssociator
Association algorithm to pair predictions to detections
- update_tracker(time: datetime, detections: set[Detection]) tuple[datetime, set[Track]]
Use time and detections to create tracks.
This is an alternative to iterating over the tracker, instead the tracker can be progressed by multiple calls to this method.
- Parameters:
time (
datetime.datetime) – Datetime of current time stepdetections (set of
Detection) – Detections existing in the time step to be tracked
- Returns:
datetime.datetime– Datetime of current time stepset of
Track– Tracks existing in the time step
- class stonesoup.tracker.simple.SingleTargetMixtureTracker(initiator: Initiator, deleter: Deleter, detector: DetectionReader, data_associator: DataAssociator, updater: Updater)[source]
Bases:
_TrackerMixInNext,TrackerA simple single target tracking that receives associations from a (Gaussian) Mixture associator.
Track single objects using Stone Soup components. The tracker works by first calling the
data_associatorwith the active track, and then either updating the track state with the result of thedata_associatorthat reduces the (Gaussian) Mixture of all possible track-detection associations, or with the prediction if no detection is associated to the track. The track is then checked for deletion by thedeleter, and remaining unassociated detections are passed to theinitiatorto generate new track.- Parameters:
initiator (
Initiator) – Initiator used to initialise the track.deleter (
Deleter) – Deleter used to delete tracks.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.
- detector: DetectionReader
Detector used to generate detection objects.
- data_associator: DataAssociator
Association algorithm to pair predictions to detections
- update_tracker(time: datetime, detections: set[Detection]) tuple[datetime, set[Track]]
Use time and detections to create tracks.
This is an alternative to iterating over the tracker, instead the tracker can be progressed by multiple calls to this method.
- Parameters:
time (
datetime.datetime) – Datetime of current time stepdetections (set of
Detection) – Detections existing in the time step to be tracked
- Returns:
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:
_TrackerMixInNext,TrackerA simple multi target tracker.
Track multiple objects using Stone Soup components. The tracker works by first calling the
data_associatorwith the active tracks, and then either updating the track state with the result of theupdaterif 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 theinitiatorto generate new tracks.- Parameters:
initiator (
Initiator) – Initiator used to initialise the track.deleter (
Deleter) – Deleter used to delete tracks.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.
- detector: DetectionReader
Detector used to generate detection objects.
- data_associator: DataAssociator
Association algorithm to pair predictions to detections
- update_tracker(time: datetime, detections: set[Detection]) tuple[datetime, set[Track]]
Use time and detections to create tracks.
This is an alternative to iterating over the tracker, instead the tracker can be progressed by multiple calls to this method.
- Parameters:
time (
datetime.datetime) – Datetime of current time stepdetections (set of
Detection) – Detections existing in the time step to be tracked
- Returns:
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:
_TrackerMixInNext,TrackerA 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_associatorwith the active tracks, and then either updating the track state with the result of thedata_associatorthat 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 theinitiatorto generate new tracks.- Parameters:
initiator (
Initiator) – Initiator used to initialise the track.deleter (
Deleter) – Deleter used to delete tracks.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.
- detector: DetectionReader
Detector used to generate detection objects.
- data_associator: DataAssociator
Association algorithm to pair predictions to detections
- update_tracker(time: datetime, detections: set[Detection]) tuple[datetime, set[Track]]
Use time and detections to create tracks.
This is an alternative to iterating over the tracker, instead the tracker can be progressed by multiple calls to this method.
- Parameters:
time (
datetime.datetime) – Datetime of current time stepdetections (set of
Detection) – Detections existing in the time step to be tracked
- Returns:
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:
_TrackerMixInNext,TrackerBase 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). The tag should beTaggedWeightedGaussianState.BIRTH
- detector: DetectionReader
Detector used to generate detection objects.
- hypothesiser: GaussianMixtureHypothesiser
Association algorithm to pair predictions to detections
- reducer: GaussianMixtureReducer
Reducer used to reduce the number of components in the mixture.
- extraction_threshold: Probability
Threshold to extract components from the mixture.
- birth_component: TaggedWeightedGaussianState
The birth component. The weight should be equal to the mean of the expected number of births per timestep (Poission distributed). The tag should be
TaggedWeightedGaussianState.BIRTH
- 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
- 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.
- update_tracker(time: datetime, detections: set[Detection]) tuple[datetime, set[Track]]
Use time and detections to create tracks.
This is an alternative to iterating over the tracker, instead the tracker can be progressed by multiple calls to this method.
- Parameters:
time (
datetime.datetime) – Datetime of current time stepdetections (set of
Detection) – Detections existing in the time step to be tracked
- Returns:
datetime.datetime– Datetime of current time stepset of
Track– Tracks existing in the time step