Skip to content

Commit

Permalink
bug fix: switched rows and cols for correct detections in confusion m…
Browse files Browse the repository at this point in the history
…atrix (#2883)
  • Loading branch information
MichHeilig committed Apr 21, 2021
1 parent 5f7d39f commit d48a34d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d48a34d

Please sign in to comment.