Basic Performance Metrics
Basic performance metrics are computed based on the error classifications described in Basic Errors.
Warning
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 (including Precision and F1 Score).
These metrics can be computed as follows:
from traccuracy.matchers import PointMatcher
from traccuracy.metrics import BasicMetrics
# Data loaded using a function from traccuracy.loaders or constructed explicitly using a networkx graph and associated information
gt_data: TrackingGraph
pred_data: TrackingGraph
results, matched = run_metrics(
gt_data=gt_data,
pred_data=pred_data,
matcher=PointMatcher(), # Choose a matcher that produces a one-to-one mapping
metrics=[BasicMetrics()]
)
The results object contains a dictionary results.results that stores all values associated with the metric.
The following counts are returned:
Total ground truth
Total predicted
If relax_skips_gt or relax_skips_pred are set to True, the following additional counts are returned and included in the calculation of summary statistics listed below. For a complete description of how skip edges are handled, see here.
Skip true positives
Skip false positives
Skip false negatives
Using these counts, the following summary stastics are computed for both nodes and edges: