Michael Heilig commited on
Commit
d48a34d
1 Parent(s): 5f7d39f

bug fix: switched rows and cols for correct detections in confusion matrix (#2883)

Browse files
Files changed (1) hide show
  1. utils/metrics.py +1 -1
utils/metrics.py CHANGED
@@ -145,7 +145,7 @@ class ConfusionMatrix:
145
  for i, gc in enumerate(gt_classes):
146
  j = m0 == i
147
  if n and sum(j) == 1:
148
- self.matrix[gc, detection_classes[m1[j]]] += 1 # correct
149
  else:
150
  self.matrix[self.nc, gc] += 1 # background FP
151
 
 
145
  for i, gc in enumerate(gt_classes):
146
  j = m0 == i
147
  if n and sum(j) == 1:
148
+ self.matrix[detection_classes[m1[j]], gc] += 1 # correct
149
  else:
150
  self.matrix[self.nc, gc] += 1 # background FP
151