Remove redundant speed/study half argument (#3557)
This commit is contained in:
1 parent
5948f20a3d
commit
4ef9261870
1 file changed
+2
-3
@@ -336,8 +336,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
elif opt.task == 'speed': # speed benchmarks
|
elif opt.task == 'speed': # speed benchmarks
|
||||||
for w in opt.weights if isinstance(opt.weights, list) else [opt.weights]:
|
for w in opt.weights if isinstance(opt.weights, list) else [opt.weights]:
|
||||||
test(opt.data, w, opt.batch_size, opt.img_size, 0.25, 0.45, save_json=False, plots=False, half=True,
|
test(opt.data, w, opt.batch_size, opt.img_size, 0.25, 0.45, save_json=False, plots=False, opt=opt)
|
||||||
opt=opt)
|
|
||||||
|
|
||||||
elif opt.task == 'study': # run over a range of settings and save/plot
|
elif opt.task == 'study': # run over a range of settings and save/plot
|
||||||
# python test.py --task study --data coco.yaml --iou 0.7 --weights yolov5s.pt yolov5m.pt yolov5l.pt yolov5x.pt
|
# python test.py --task study --data coco.yaml --iou 0.7 --weights yolov5s.pt yolov5m.pt yolov5l.pt yolov5x.pt
|
||||||
@@ -348,7 +347,7 @@ if __name__ == '__main__':
|
|||||||
for i in x: # img-size
|
for i in x: # img-size
|
||||||
print(f'\nRunning {f} point {i}...')
|
print(f'\nRunning {f} point {i}...')
|
||||||
r, _, t = test(opt.data, w, opt.batch_size, i, opt.conf_thres, opt.iou_thres, opt.save_json,
|
r, _, t = test(opt.data, w, opt.batch_size, i, opt.conf_thres, opt.iou_thres, opt.save_json,
|
||||||
plots=False, half=True, opt=opt)
|
plots=False, opt=opt)
|
||||||
y.append(r + t) # results and times
|
y.append(r + t) # results and times
|
||||||
np.savetxt(f, y, fmt='%10.4g') # save
|
np.savetxt(f, y, fmt='%10.4g') # save
|
||||||
os.system('zip -r study.zip study_*.txt')
|
os.system('zip -r study.zip study_*.txt')
|
||||||
|
|||||||
Reference in new issue
Block a user