Graph Error Test Cases (Non-Dividing)
To facilitate testing, we have provided a suite of canonical examples that cover the basic, simple scenarios that can occur in segmentation and tracking. Here we describe them and show visualizations of each case.
Metrics should test all the graph and division error cases that are possible with the matchers that the metric supports. For example, if the metric requires a one-to-one matching, it is not necessary to test the two-to-one or one-to-two cases.
plot_matched([ex_graphs.empty_gt()], "Empty Ground Truth")
plot_matched([ex_graphs.empty_pred()], "Empty Prediction")
plot_matched([ex_graphs.good_matched()], "Good Matching")
plot_matched([ex_graphs.fn_node_matched(t) for t in [0, 1, 2]], "False Negative Node")
plot_matched([ex_graphs.fn_edge_matched(t) for t in [0, 1]], "False Negative Edge")
plot_matched([ex_graphs.fp_node_matched(t) for t in [0, 1, 2]], "False Positive Node")
plot_matched([ex_graphs.fp_edge_matched(t) for t in [0, 1]], "False Positive Edge")
plot_matched([ex_graphs.crossover_edge()], "Crossover False Positive")
plot_matched(
[ex_graphs.node_two_to_one(t) for t in [0, 1, 2]],
"Two GT nodes to one pred node",
)
plot_matched(
[ex_graphs.edge_two_to_one(t) for t in [0, 1]], "Two GT edges to one pred edge"
)
plot_matched(
[ex_graphs.node_one_to_two(t) for t in [0, 1, 2]],
"One GT node to two pred nodes",
)
plot_matched(
[ex_graphs.edge_one_to_two(t) for t in [0, 1]], "One GT edge to 2 pred edges"
)
plot_matched(
[ex_graphs.gap_close_two_to_one()], "Two GT edges to one pred skip edge"
)
plot_matched(
[
ex_graphs.gap_close_gt_gap(),
ex_graphs.gap_close_pred_gap(),
ex_graphs.gap_close_matched_gap(),
ex_graphs.gap_close_offset(),
],
"Skip edge cases",
)
plot_matched(
[ex_graphs.all_basic_errors()],
"All basic errors",
figsize=(6, 2)
)