This commit is contained in:
Glenn Jocher 2019-12-30 11:57:36 -08:00
parent f3e87862a4
commit b636f7f7ab
1 changed files with 1 additions and 1 deletions

View File

@ -760,7 +760,7 @@ def kmeans_targets(path='../coco/trainvalno5k.txt', n=9, img_size=416): # from
# ax[0].plot(np.arange(1, 21), np.array(d) ** 2, marker='.') # ax[0].plot(np.arange(1, 21), np.array(d) ** 2, marker='.')
# Measure IoUs # Measure IoUs
iou = torch.stack([wh_iou(torch.Tensor(wh).T, torch.Tensor(x).T) for x in k], 0) iou = wh_iou(torch.Tensor(wh), torch.Tensor(k))
biou = iou.max(0)[0] # closest anchor IoU biou = iou.max(0)[0] # closest anchor IoU
print('Best possible recall: %.3f' % (biou > 0.2635).float().mean()) # BPR (best possible recall) print('Best possible recall: %.3f' % (biou > 0.2635).float().mean()) # BPR (best possible recall)