Skip to content

Commit

Permalink
Remove redundant speed/study half argument (ultralytics#3557)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4ef9261)
  • Loading branch information
glenn-jocher authored and Lechtr committed Jun 14, 2021
1 parent b27f76e commit f4dc8bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,7 @@ def test(data,

elif opt.task == 'speed': # speed benchmarks
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,
opt=opt)
test(opt.data, w, opt.batch_size, opt.img_size, 0.25, 0.45, save_json=False, plots=False, opt=opt)

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
Expand All @@ -348,7 +347,7 @@ def test(data,
for i in x: # img-size
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,
plots=False, half=True, opt=opt)
plots=False, opt=opt)
y.append(r + t) # results and times
np.savetxt(f, y, fmt='%10.4g') # save
os.system('zip -r study.zip study_*.txt')
Expand Down

0 comments on commit f4dc8bc

Please sign in to comment.