Skip to content

Commit 21cc37a

Browse files
committed
Added intermediate Measures from TRA (AOGM etc.) to the output. (Suggested by JoOkuma #11)
1 parent 7044521 commit 21cc37a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ctc_metrics/metrics/technical/tra.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ def tra(
4444
AOGM_0 = w_fn * num_vertices + w_ea * num_edges
4545
# Calculate DET
4646
TRA = 1 - min(AOGM, AOGM_0) / AOGM_0
47-
return float(TRA)
47+
return float(TRA), AOGM, AOGM_0
4848

ctc_metrics/scripts/evaluate.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,12 @@ def calculate_metrics(
198198
results["SEG"] = seg(segm["labels_ref"], segm["ious"])
199199

200200
if "TRA" in metrics:
201-
results["TRA"] = tra(**graph_operations)
201+
_tra, _aogm, _aogm0 = tra(**graph_operations)
202+
results["TRA"] = _tra
203+
results["AOGM"] = _aogm
204+
results["AOGM_0"] = _aogm0
205+
for key in ["NS", "FN", "FP", "ED", "EA", "EC"]:
206+
results[f"AOGM_{key}"] = graph_operations[key]
202207

203208
if "LNK" in metrics:
204209
results["LNK"] = lnk(**graph_operations)
@@ -265,7 +270,6 @@ def calculate_metrics(
265270
results.update(faf(
266271
traj["labels_comp_merged"], traj["mapped_comp_merged"]))
267272

268-
269273
return results
270274

271275

0 commit comments

Comments
 (0)