Fix Classify confusion matrix (#3241)

pull/3242/head
Glenn Jocher 1 year ago committed by GitHub
parent 9c44560ec4
commit 9d38d2b044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ultralytics/yolo/utils/metrics.py

@ -204,7 +204,7 @@ class ConfusionMatrix:
"""
preds, targets = torch.cat(preds)[:, 0], torch.cat(targets)
for p, t in zip(preds.cpu().numpy(), targets.cpu().numpy()):
self.matrix[t][p] += 1
self.matrix[p][t] += 1
def process_batch(self, detections, labels):
"""

Loading…
Cancel
Save