Browse Source

Confusion matrix native image-space fix (#2046)

Make sure the labels and predictions are equally scaled on confusion_matrix.process_batch
5.0
ramonhollands GitHub 3 years ago
parent
commit
d68afedb32
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      test.py

+ 1
- 1
test.py View File

@@ -178,7 +178,7 @@ def test(data,
tbox = xywh2xyxy(labels[:, 1:5])
scale_coords(img[si].shape[1:], tbox, shapes[si][0], shapes[si][1]) # native-space labels
if plots:
confusion_matrix.process_batch(pred, torch.cat((labels[:, 0:1], tbox), 1))
confusion_matrix.process_batch(predn, torch.cat((labels[:, 0:1], tbox), 1))

# Per target class
for cls in torch.unique(tcls_tensor):

Loading…
Cancel
Save