Metric#
- class maite.protocols.multiobject_tracking.Metric(*args, **kwargs)[source]#
A metric protocol for the multi-object tracking AI problem.
A metric in this sense is expected to measure the level of agreement between model predictions and ground-truth labels.
- Attributes:
- metadata
MetricMetadata A typed dictionary containing at least an ‘id’ field of type str
- metadata
Methods
update(pred_batch: Sequence[MultiobjectTrackingTarget], target_batch: Sequence[MultiobjectTrackingTarget], metadata_batch: Sequence[DatumMetadata]) -> None
Add predictions and targets (and metadata if applicable) to metric’s cache for later calculation.
compute() -> Mapping[str, Any]
Compute metric value(s) for currently cached predictions and targets, returned as a read-only mapping.
reset() -> None
Clear contents of current metric’s cache of predictions and targets.