Unverified 提交 d68afedb authored 作者: ramonhollands's avatar ramonhollands 提交者: GitHub

Confusion matrix native image-space fix (#2046)

Make sure the labels and predictions are equally scaled on confusion_matrix.process_batch
上级 8fcbe434
...@@ -178,7 +178,7 @@ def test(data, ...@@ -178,7 +178,7 @@ def test(data,
tbox = xywh2xyxy(labels[:, 1:5]) tbox = xywh2xyxy(labels[:, 1:5])
scale_coords(img[si].shape[1:], tbox, shapes[si][0], shapes[si][1]) # native-space labels scale_coords(img[si].shape[1:], tbox, shapes[si][0], shapes[si][1]) # native-space labels
if plots: 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 # Per target class
for cls in torch.unique(tcls_tensor): for cls in torch.unique(tcls_tensor):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论