updates
This commit is contained in:
parent
1430a1e408
commit
3e633783d8
6
test.py
6
test.py
|
@ -17,6 +17,7 @@ def test(cfg,
|
||||||
iou_thres=0.6, # for nms
|
iou_thres=0.6, # for nms
|
||||||
save_json=False,
|
save_json=False,
|
||||||
single_cls=False,
|
single_cls=False,
|
||||||
|
profile=False,
|
||||||
model=None,
|
model=None,
|
||||||
dataloader=None):
|
dataloader=None):
|
||||||
# Initialize/load model and set device
|
# Initialize/load model and set device
|
||||||
|
@ -182,7 +183,7 @@ def test(cfg,
|
||||||
print(pf % (names[c], seen, nt[c], p[i], r[i], ap[i], f1[i]))
|
print(pf % (names[c], seen, nt[c], p[i], r[i], ap[i], f1[i]))
|
||||||
|
|
||||||
# Print profile results
|
# Print profile results
|
||||||
if opt.profile:
|
if profile:
|
||||||
t = tuple(x / seen * 1E3 for x in (t0, t1, t0 + t1))
|
t = tuple(x / seen * 1E3 for x in (t0, t1, t0 + t1))
|
||||||
print('Profile results: %.1f/%.1f/%.1f ms inference/NMS/total per image' % t)
|
print('Profile results: %.1f/%.1f/%.1f ms inference/NMS/total per image' % t)
|
||||||
|
|
||||||
|
@ -244,7 +245,8 @@ if __name__ == '__main__':
|
||||||
opt.conf_thres,
|
opt.conf_thres,
|
||||||
opt.iou_thres,
|
opt.iou_thres,
|
||||||
opt.save_json,
|
opt.save_json,
|
||||||
opt.single_cls)
|
opt.single_cls,
|
||||||
|
opt.profile)
|
||||||
|
|
||||||
elif opt.task == 'benchmark': # mAPs at 320-608 at conf 0.5 and 0.7
|
elif opt.task == 'benchmark': # mAPs at 320-608 at conf 0.5 and 0.7
|
||||||
y = []
|
y = []
|
||||||
|
|
Loading…
Reference in New Issue