traccuracy.metrics._ctc

Module Contents

Classes

AOGMMetrics

Computes the Acyclic Oriented Graph Measure (AOGM), along with the error counts

CTCMetrics

Computes the original Cell Tracking Challenging metrics: TRA, DET, LNK.

Functions

get_weighted_vertex_error_sum(→ float)

get_weighted_edge_error_sum(→ float)

get_weighted_error_sum(→ float)

class traccuracy.metrics._ctc.AOGMMetrics(vertex_ns_weight: float = 1, vertex_fp_weight: float = 1, vertex_fn_weight: float = 1, edge_fp_weight: float = 1, edge_fn_weight: float = 1, edge_ws_weight: float = 1)[source]

Computes the Acyclic Oriented Graph Measure (AOGM), along with the error counts

The AOGM metric is a generalized graph measure that allows users to define their own error weights for each type of node and edge error. The AOGM is simply the weighted sum of all errors.

These metrics are written assuming that the ground truth annotations are dense. If that is not the case, interpret the numbers carefully. Consider eliminating metrics that use the number of false positives.

Parameters:
  • vertex_ns_weight (float) – Weight for vertex/node non-split errors. Defaults to 1

  • vertex_fp_weight (float) – Weight for false positive vertex/node errors. Defaults to 1

  • vertex_fn_weight (float) – Weight for false negative vertex/node errors. Defaults to 1

  • edge_fp_weight (float) – Weight for false positive edge errors. Defaults to 1

  • edge_fn_weight (float) – Weight for false negative edge errors. Defaults to 1

  • edge_ws_weight (float) – Weight for wrong semantic edge errors. Defaults to 1

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:

traccuracy.metrics._results.Results

class traccuracy.metrics._ctc.CTCMetrics[source]

Computes the original Cell Tracking Challenging metrics: TRA, DET, LNK. These metrics are based on the more general AOGM metric.

  • DET: Assesses detection performance

  • LNK: Assesses linking performance by measuring only edge errors

  • TRA: Assesses both detection and tracking performance

These metrics are written assuming that the ground truth annotations are dense. If that is not the case, interpret the numbers carefully. Consider eliminating metrics that use the number of false positives.

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:

traccuracy.metrics._results.Results

traccuracy.metrics._ctc.get_weighted_vertex_error_sum(vertex_error_counts: dict[str, float], vertex_ns_weight: float = 1, vertex_fp_weight: float = 1, vertex_fn_weight: float = 1) float[source]
traccuracy.metrics._ctc.get_weighted_edge_error_sum(edge_error_counts: dict[str, float], edge_fp_weight: float = 1, edge_fn_weight: float = 1, edge_ws_weight: float = 1) float[source]
traccuracy.metrics._ctc.get_weighted_error_sum(vertex_error_counts: dict[str, float], edge_error_counts: dict[str, float], vertex_ns_weight: float = 1, vertex_fp_weight: float = 1, vertex_fn_weight: float = 1, edge_fp_weight: float = 1, edge_fn_weight: float = 1, edge_ws_weight: float = 1) float[source]