Source code for stonesoup.types.detection

# -*- coding: utf-8 -*-
from typing import MutableMapping

from ..base import Property
from .groundtruth import GroundTruthPath
from .state import State, GaussianState, StateVector
from ..models.measurement import MeasurementModel

[docs]class Detection(State): """Detection type""" measurement_model: MeasurementModel = Property( default=None, doc="The measurement model used to generate the detection (the default is ``None``)") metadata: MutableMapping = Property( default=None, doc='Dictionary of metadata items for Detections.') def __init__(self, state_vector, *args, **kwargs): super().__init__(state_vector, *args, **kwargs) if self.metadata is None: self.metadata = {}
[docs]class GaussianDetection(Detection, GaussianState): """GaussianDetection type"""
[docs]class Clutter(Detection): """Clutter type for detections classed as clutter This is same as :class:`~.Detection`, but can be used to identify clutter for metrics and analysis purposes. """
[docs]class TrueDetection(Detection): """TrueDetection type for detections that come from ground truth This is same as :class:`~.Detection`, but can be used to identify true detections for metrics and analysis purposes. """ groundtruth_path: GroundTruthPath = Property( doc="Ground truth path that this detection came from")
[docs]class MissedDetection(Detection): """Detection type for a missed detection This is same as :class:`~.Detection`, but it is used in MultipleHypothesis to indicate the null hypothesis (no detections are associated with the specified track). """ state_vector: StateVector = Property(default=None, doc="State vector. Default `None`.") def __init__(self, state_vector=None, *args, **kwargs): super().__init__(state_vector, *args, **kwargs) def __bool__(self): return False