traccuracy._run_metrics

Module Contents

Functions

run_metrics(→ tuple[list[dict], ...)

Compute given metrics on data using the given matcher.

traccuracy._run_metrics.run_metrics(gt_data: traccuracy._tracking_graph.TrackingGraph, pred_data: traccuracy._tracking_graph.TrackingGraph, matcher: traccuracy.matchers._base.Matcher, metrics: list[traccuracy.metrics._base.Metric], relax_skips_gt: bool = False, relax_skips_pred: bool = False) tuple[list[dict], traccuracy.matchers._matched.Matched][source]

Compute given metrics on data using the given matcher.

The returned result dictionary will contain all metrics computed by the given Metric classes, as well as general summary numbers e.g. false positive/false negative detection and edge counts.

Parameters:
  • gt_data (traccuracy.TrackingGraph) – ground truth graph and optionally segmentation

  • pred_data (traccuracy.TrackingGraph) – predicted graph and optionally segmentation

  • matcher (traccuracy.matchers._base.Matcher) – instantiated matcher object

  • metrics (List[traccuracy.metrics._base.Metric]) – list of instantiated metrics objects to compute

  • 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:

List of dictionaries with one dictionary per Metric object Matched: Matched data which includes annotated graphs

Return type:

List[Dict]