From a34ea51cdb444eb13a41096852a0d2bce42d6287 Mon Sep 17 00:00:00 2001 From: ramonhollands Date: Tue, 26 Jan 2021 22:39:19 +0100 Subject: [PATCH] Confusion matrix native image-space fix (#2046) Make sure the labels and predictions are equally scaled on confusion_matrix.process_batch --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 2cbbbba5c9a2..891f6bef41c6 100644 --- a/test.py +++ b/test.py @@ -178,7 +178,7 @@ def test(data, tbox = xywh2xyxy(labels[:, 1:5]) scale_coords(img[si].shape[1:], tbox, shapes[si][0], shapes[si][1]) # native-space labels if plots: - confusion_matrix.process_batch(pred, torch.cat((labels[:, 0:1], tbox), 1)) + confusion_matrix.process_batch(predn, torch.cat((labels[:, 0:1], tbox), 1)) # Per target class for cls in torch.unique(tcls_tensor):