Improved export.py usage examples (#6495)

* Improved `export.py` usage examples

* Cleanup
This commit is contained in:
Glenn Jocher 2022-02-01 22:06:29 +01:00 committed by GitHub
parent b884ea36c4
commit 5e4ff195b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,10 +469,10 @@ def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path'
f = [str(x) for x in f if x] # filter out '' and None
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
f"\nVisualize with https://netron.app"
f"\nDetect with `python detect.py --weights {f[-1]}`"
f" or `model = torch.hub.load('ultralytics/yolov5', 'custom', '{f[-1]}')"
f"\nValidate with `python val.py --weights {f[-1]}`")
f"\nDetect: python detect.py --weights {f[-1]}"
f"\nPyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', '{f[-1]}')"
f"\nValidate: python val.py --weights {f[-1]}"
f"\nVisualize: https://netron.app")
return f # return list of exported files/dirs