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:
1 parent
006eb40ab7
commit
22da63e30f
1 file changed
+1
@@ -476,6 +476,7 @@ 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
|
||||||
|
if any(f):
|
||||||
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
|
LOGGER.info(f'\nExport complete ({time.time() - t:.2f}s)'
|
||||||
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
|
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]}"
|
||||||
|
|||||||
Reference in new issue
Block a user