This commit is contained in:
Glenn Jocher 2020-01-06 14:25:11 -08:00
parent 3b5ca2ea90
commit bf42c31d9e
1 changed files with 1 additions and 1 deletions

View File

@ -761,7 +761,7 @@ def kmean_anchors(path='../coco/train2017.txt', n=9, img_size=(320, 640)):
def fitness(thr, wh, k): # mutation fitness def fitness(thr, wh, k): # mutation fitness
iou = wh_iou(wh, torch.Tensor(k)).max(1)[0] # max iou iou = wh_iou(wh, torch.Tensor(k)).max(1)[0] # max iou
bpr = (iou > thr).float().mean() # best possible recall bpr = (iou > thr).float().mean() # best possible recall
return iou.mean() * 0.80 + bpr * 0.20 # weighted combination return iou.mean() * bpr # product
# Get label wh # Get label wh
wh = [] wh = []