This commit is contained in:
Glenn Jocher 2020-01-08 18:48:41 -08:00
parent fd8cd377c3
commit c1527e4ab1
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ def test(cfg,
if pred is None:
if nl:
stats.append((torch.zeros(0, 1), torch.Tensor(), torch.Tensor(), tcls))
stats.append((torch.zeros(0, niou, dtype=torch.bool), torch.Tensor(), torch.Tensor(), tcls))
continue
# Append to text file
@ -147,7 +147,7 @@ def test(cfg,
d = ti[i[j]] # detected target
if d not in detected:
detected.append(d)
correct[pi[j]] = ious[j] > iouv # iou_thres is 1xn
correct[pi[j]] = (ious[j] > iouv).cpu() # iou_thres is 1xn
if len(detected) == nl: # all targets already located in image
break