Update parse_opt() in export.py to work as in train.py (#10789)
Update parse_opt() to work as in train.py
Change parse_opt() be able to use parse_known_args(), same as in train.py, so export.main() can be called from other script without error.
e.g.:
from yolov5 import export
opt = export.parse_opt(True)
opt.weights = <model_path>
opt.include = ("torchscript", "onnx")
opt.data = <data>
opt.imgsz = [<height>, <width>]
export.main(opt)
Signed-off-by:
Johan Bergman <35481994+duran67@users.noreply.github.com>
Signed-off-by:
Johan Bergman <35481994+duran67@users.noreply.github.com>
正在显示
请
注册
或者
登录
后发表评论