mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
bug fix: switched rows and cols for correct detections in confusion matrix (#2883)
This commit is contained in:
parent
5f7d39fede
commit
d48a34dca7
@ -145,7 +145,7 @@ class ConfusionMatrix:
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user