MCPcopy
hub / github.com/WongKinYiu/PyTorch_YOLOv4 / fitness

Function fitness

utils/utils.py:718–721  ·  view source on GitHub ↗
(k)

Source from the content-addressed store, hash-verified

716 return k
717
718 def fitness(k): # mutation fitness
719 iou = wh_iou(wh, torch.Tensor(k)) # iou
720 max_iou = iou.max(1)[0]
721 return (max_iou * (max_iou > thr).float()).mean() # product
722
723 # Get label wh
724 wh = []

Callers 6

select_best_evolveFunction · 0.70
kmean_anchorsFunction · 0.70
print_mutationFunction · 0.70
plot_evolution_resultsFunction · 0.70
trainFunction · 0.50
train.pyFile · 0.50

Calls 1

wh_iouFunction · 0.70

Tested by

no test coverage detected