updates
This commit is contained in:
parent
d5fd37de26
commit
6bd2c22523
4
test.py
4
test.py
|
@ -54,7 +54,7 @@ def test(
|
|||
seen = 0
|
||||
model.eval()
|
||||
coco91class = coco80_to_coco91_class()
|
||||
print(('%20s' + '%10s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', 'mAP', 'F1'))
|
||||
print(('%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')):
|
||||
|
@ -150,7 +150,7 @@ def test(
|
|||
mp, mr, map, mf1 = p.mean(), r.mean(), ap.mean(), f1.mean()
|
||||
|
||||
# Print results
|
||||
pf = '%20s' + '%10.3g' * 6 # print format
|
||||
pf = '%30s' + '%10.3g' * 6 # print format
|
||||
print(pf % ('all', seen, nt.sum(), mp, mr, map, mf1))
|
||||
|
||||
# Print results per class
|
||||
|
|
Loading…
Reference in New Issue