From 2b3b3397d27d4e8946939640eb92c51d6d0a064b Mon Sep 17 00:00:00 2001 From: Michael Heilig <75843816+MichHeilig@users.noreply.github.com> Date: Thu, 22 Apr 2021 00:49:55 +0200 Subject: [PATCH] bug fix: switched rows and cols for correct detections in confusion matrix (#2883) --- utils/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/metrics.py b/utils/metrics.py index 666b8c7ec1c0..323c84b6c873 100644 --- a/utils/metrics.py +++ b/utils/metrics.py @@ -145,7 +145,7 @@ def process_batch(self, detections, labels): for i, gc in enumerate(gt_classes): j = m0 == i if n and sum(j) == 1: - self.matrix[gc, detection_classes[m1[j]]] += 1 # correct + self.matrix[detection_classes[m1[j]], gc] += 1 # correct else: self.matrix[self.nc, gc] += 1 # background FP