updates
This commit is contained in:
parent
c77b87489c
commit
bb38391342
4
test.py
4
test.py
|
@ -54,10 +54,10 @@ def test(
|
|||
seen = 0
|
||||
model.eval()
|
||||
coco91class = coco80_to_coco91_class()
|
||||
print(('%30s' + '%10s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', 'mAP', 'F1'))
|
||||
s = ('%30s' + '%10s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', 'mAP', 'F1')
|
||||
loss, p, r, f1, mp, mr, map, mf1 = 0., 0., 0., 0., 0., 0., 0., 0.
|
||||
jdict, stats, ap, ap_class = [], [], [], []
|
||||
for batch_i, (imgs, targets, paths, shapes) in enumerate(tqdm(dataloader, desc='Computing mAP')):
|
||||
for batch_i, (imgs, targets, paths, shapes) in enumerate(tqdm(dataloader, desc=s)):
|
||||
targets = targets.to(device)
|
||||
imgs = imgs.to(device)
|
||||
_, _, height, width = imgs.shape # batch size, channels, height, width
|
||||
|
|
2
train.py
2
train.py
|
@ -348,7 +348,7 @@ if __name__ == '__main__':
|
|||
|
||||
# Mutate
|
||||
init_seeds(seed=int(time.time()))
|
||||
s = [.15, .15, .15, .15, .15, .15, .15, .15, .15, .15, .15, .15] # fractional sigmas
|
||||
s = [.15, .15, .15, .15, .15, .15, .15, .15, .10, .10, .10, .10] # fractional sigmas
|
||||
for i, k in enumerate(hyp.keys()):
|
||||
x = (np.random.randn(1) * s[i] + 1) ** 2.0 # plt.hist(x.ravel(), 300)
|
||||
hyp[k] *= float(x) # vary by 20% 1sigma
|
||||
|
|
Loading…
Reference in New Issue