Skip to content

Commit

Permalink
Add --half arguments to export.py Usage examples (ultralytics#8516)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored and Shivvrat committed Jul 12, 2022
1 parent 6fb2afd commit 1eefac9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions export.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,12 @@ def run(
# Finish
f = [str(x) for x in f if x] # filter out '' and None
if any(f):
h = '--half' if half else '' # --half FP16 inference arg
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
f"\nDetect: python detect.py --weights {f[-1]}"
f"\nDetect: python detect.py --weights {f[-1]} {h}"
f"\nValidate: python val.py --weights {f[-1]} {h}"
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

Expand Down

0 comments on commit 1eefac9

Please sign in to comment.