Ramon2 commited on
Commit
d68afed
1 Parent(s): 8fcbe43

Confusion matrix native image-space fix (#2046)

Browse files

Make sure the labels and predictions are equally scaled on confusion_matrix.process_batch

Files changed (1) hide show
  1. test.py +1 -1
test.py CHANGED
@@ -178,7 +178,7 @@ def test(data,
178
  tbox = xywh2xyxy(labels[:, 1:5])
179
  scale_coords(img[si].shape[1:], tbox, shapes[si][0], shapes[si][1]) # native-space labels
180
  if plots:
181
- confusion_matrix.process_batch(pred, torch.cat((labels[:, 0:1], tbox), 1))
182
 
183
  # Per target class
184
  for cls in torch.unique(tcls_tensor):
 
178
  tbox = xywh2xyxy(labels[:, 1:5])
179
  scale_coords(img[si].shape[1:], tbox, shapes[si][0], shapes[si][1]) # native-space labels
180
  if plots:
181
+ confusion_matrix.process_batch(predn, torch.cat((labels[:, 0:1], tbox), 1))
182
 
183
  # Per target class
184
  for cls in torch.unique(tcls_tensor):