diff --git a/ultralytics/yolo/utils/metrics.py b/ultralytics/yolo/utils/metrics.py index 8544adf..cd90321 100644 --- a/ultralytics/yolo/utils/metrics.py +++ b/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): """