Add `--half` arguments to export.py Usage examples (#8516)
Browse files
export.py
CHANGED
@@ -555,11 +555,12 @@ def run(
|
|
555 |
# Finish
|
556 |
f = [str(x) for x in f if x] # filter out '' and None
|
557 |
if any(f):
|
|
|
558 |
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
|
559 |
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
|
560 |
-
f"\nDetect: python detect.py --weights {f[-1]}"
|
|
|
561 |
f"\nPyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', '{f[-1]}')"
|
562 |
-
f"\nValidate: python val.py --weights {f[-1]}"
|
563 |
f"\nVisualize: https://netron.app")
|
564 |
return f # return list of exported files/dirs
|
565 |
|
|
|
555 |
# Finish
|
556 |
f = [str(x) for x in f if x] # filter out '' and None
|
557 |
if any(f):
|
558 |
+
h = '--half' if half else '' # --half FP16 inference arg
|
559 |
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
|
560 |
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
|
561 |
+
f"\nDetect: python detect.py --weights {f[-1]} {h}"
|
562 |
+
f"\nValidate: python val.py --weights {f[-1]} {h}"
|
563 |
f"\nPyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', '{f[-1]}')"
|
|
|
564 |
f"\nVisualize: https://netron.app")
|
565 |
return f # return list of exported files/dirs
|
566 |
|