From 5612e843ebddf95e8085ee6077aa3b3223d3506b Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 1 Feb 2022 21:46:42 +0100 Subject: [PATCH 1/2] Improved `export.py` usage examples --- export.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/export.py b/export.py index 589b381e035a..950fc19f36e4 100644 --- a/export.py +++ b/export.py @@ -468,11 +468,11 @@ def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path' # Finish 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"\nResults saved to {colorstr('bold', file.parent.resolve())}\n" + 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 From 241b782e8345f475726b149f3c8c7c62f78bf9ce Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 1 Feb 2022 21:48:15 +0100 Subject: [PATCH 2/2] Cleanup --- export.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/export.py b/export.py index 950fc19f36e4..bb17703821e8 100644 --- a/export.py +++ b/export.py @@ -468,11 +468,11 @@ def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path' # Finish 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())}\n" - 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") + f"\nResults saved to {colorstr('bold', file.parent.resolve())}" + 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