Skip to content

Commit

Permalink
Update test_half.py
Browse files Browse the repository at this point in the history
  • Loading branch information
WongKinYiu authored Jul 29, 2020
1 parent 878d850 commit 1861063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_half.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def test(cfg,
t = tuple(x / seen * 1E3 for x in (t0, t1, t0 + t1)) + (img_size, img_size, batch_size) # tuple
print('Speed: %.1f/%.1f/%.1f ms inference/NMS/total per %gx%g image at batch-size %g' % t)

maps = np.zeros(nc) + map
# Save JSON
if save_json and map and len(jdict):
print('\nCOCO mAP with pycocotools...')
Expand All @@ -219,7 +220,6 @@ def test(cfg,
return (mp, mr, map50, map, *(loss.cpu() / len(dataloader)).tolist()), maps, t

# Return results
maps = np.zeros(nc) + map
for i, c in enumerate(ap_class):
maps[c] = ap[i]
return (mp, mr, map, mf1, *(loss.cpu() / len(dataloader)).tolist()), maps
Expand Down

0 comments on commit 1861063

Please sign in to comment.