updates
This commit is contained in:
parent
0e17fb5905
commit
52573eb0bc
4
test.py
4
test.py
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue