mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
Fix zero-export handling with if any(f):
(#6569)
* Fix zero-export handling with `if any(f):` Partial fix for https://github.com/ultralytics/yolov5/issues/6563 * Cleanup
This commit is contained in:
parent
006eb40ab7
commit
22da63e30f
13
export.py
13
export.py
@ -476,12 +476,13 @@ def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path'
|
|||||||
|
|
||||||
# Finish
|
# Finish
|
||||||
f = [str(x) for x in f if x] # filter out '' and None
|
f = [str(x) for x in f if x] # filter out '' and None
|
||||||
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
|
if any(f):
|
||||||
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
|
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
|
||||||
f"\nDetect: python detect.py --weights {f[-1]}"
|
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
|
||||||
f"\nPyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', '{f[-1]}')"
|
f"\nDetect: python detect.py --weights {f[-1]}"
|
||||||
f"\nValidate: python val.py --weights {f[-1]}"
|
f"\nPyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', '{f[-1]}')"
|
||||||
f"\nVisualize: https://netron.app")
|
f"\nValidate: python val.py --weights {f[-1]}"
|
||||||
|
f"\nVisualize: https://netron.app")
|
||||||
return f # return list of exported files/dirs
|
return f # return list of exported files/dirs
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user