From c699cbef1503dce04ff7536ba730178e7eeb1088 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 8 Jul 2022 00:46:56 +0200 Subject: [PATCH] Add `--half` arguments to export.py Usage examples (#8516) --- export.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/export.py b/export.py index 50114d89eedc..2cbc614b59aa 100644 --- a/export.py +++ b/export.py @@ -675,11 +675,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