Pārlūkot izejas kodu

AutoAnchor n, imgsz bug fix

5.0
Glenn Jocher pirms 4 gadiem
vecāks
revīzija
ef75f7313d
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      utils/utils.py

+ 1
- 1
utils/utils.py Parādīt failu

@@ -69,7 +69,7 @@ def check_anchors(dataset, model, thr=4.0, imgsz=640):
print('Best Possible Recall (BPR) = %.4f' % bpr, end='')
if bpr < 0.99: # threshold to recompute
print('. Attempting to generate improved anchors, please wait...' % bpr)
new_anchors = kmean_anchors(dataset, n=9, img_size=640, thr=4.0, gen=1000, verbose=False)
new_anchors = kmean_anchors(dataset, n=anchors.numel() // 2, img_size=imgsz, thr=thr, gen=1000, verbose=False)
new_bpr = metric(new_anchors.reshape(-1, 2))
if new_bpr > bpr:
anchors[:] = torch.tensor(new_anchors).view_as(anchors).type_as(anchors)

Notiek ielāde…
Atcelt
Saglabāt