traccuracy.metrics._track_overlap
This submodule implements routines for Track Purity (TP) and Target Effectiveness (TE) scores.
Definitions (Bise et al., 2011; Chen, 2021; Fukai et al., 2022):
TE for a single ground truth track T^g_j is calculated by finding the predicted track T^p_k that overlaps with T^g_j in the largest number of the frames and then dividing the overlap frame counts by the total frame counts for T^g_j. The TE for the total dataset is calculated as the mean of TEs for all ground truth tracks, weighted by the length of the tracks.
TP is defined analogously, with T^g_j and T^p_j being swapped in the definition.
Module Contents
Classes
Calculate metrics for longest track overlaps. |
- class traccuracy.metrics._track_overlap.TrackOverlapMetrics(include_division_edges: bool = True)[source]
Calculate metrics for longest track overlaps.
- Target Effectiveness: fraction of longest overlapping prediction
tracklets on each GT tracklet
- Track Purityfraction of longest overlapping GT
tracklets on each prediction tracklet
- Parameters:
matched_data (traccuracy.matchers.Matched) – Matched object for set of GT and Pred data
include_division_edges (bool, optional) – If True, include edges at division.
- property info: dict[str, Any]
Dictionary with Metric name and any parameters
- compute(matched: traccuracy.matchers._matched.Matched, override_matcher: bool = False, relax_skips_gt: bool = False, relax_skips_pred: bool = False) traccuracy.metrics._results.Results
The compute methods of Metric objects return a Results object populated with results and associated metadata
- Parameters:
matched (traccuracy.matchers.Matched) – Matched data object to compute metrics on
override_matcher (bool) – If True, the metric will not validate the matcher type
relax_skips_gt (bool) – If True, the metric will check if skips in the ground truth graph have an equivalent multi-edge path in predicted graph
relax_skips_pred (bool) – If True, the metric will check if skips in the predicted graph have an equivalent multi-edge path in ground truth graph
- Returns:
- Object containing metric results
and associated pipeline metadata
- Return type: