This commit is contained in:
Glenn Jocher 2020-03-13 10:20:52 -07:00
parent a2f5bc477c
commit 5362e8254e
1 changed files with 2 additions and 2 deletions

View File

@ -127,8 +127,8 @@ def test(cfg,
for di, d in enumerate(pred): for di, d in enumerate(pred):
jdict.append({'image_id': image_id, jdict.append({'image_id': image_id,
'category_id': coco91class[int(d[5])], 'category_id': coco91class[int(d[5])],
'bbox': [round(x, 3) for x in box[di]], 'bbox': [round(x, 3) for x in box[di].tolist()],
'score': round(d[4], 5)}) 'score': round(d[4].item(), 5)})
# Assign all predictions as incorrect # Assign all predictions as incorrect
correct = torch.zeros(pred.shape[0], niou, dtype=torch.bool, device=device) correct = torch.zeros(pred.shape[0], niou, dtype=torch.bool, device=device)