This commit is contained in:
Glenn Jocher 2019-12-22 16:21:17 -08:00
parent 0e17fb5905
commit 52573eb0bc
1 changed files with 1 additions and 3 deletions

View File

@ -130,9 +130,7 @@ def test(cfg,
tcls_tensor = labels[:, 0] tcls_tensor = labels[:, 0]
# target boxes # target boxes
tbox = xywh2xyxy(labels[:, 1:5]) tbox = xywh2xyxy(labels[:, 1:5]) * torch.Tensor([width, height, width, height]).to(device)
tbox[:, [0, 2]] *= width
tbox[:, [1, 3]] *= height
# Per target class # Per target class
for cls in torch.unique(tcls_tensor): for cls in torch.unique(tcls_tensor):