From 2fcca6a0ea4230ec77c04ed6708ab90aef69afa6 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 5 Apr 2023 12:00:28 +0200 Subject: [PATCH] `ultralytics 8.0.63` CLI AMP check fix (#1838) Co-authored-by: Ayush Chaurasia Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- ultralytics/__init__.py | 2 +- ultralytics/yolo/engine/model.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index c9addaf..efc7f0c 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, GPL-3.0 license -__version__ = '8.0.62' +__version__ = '8.0.63' from ultralytics.hub import start from ultralytics.yolo.engine.model import YOLO diff --git a/ultralytics/yolo/engine/model.py b/ultralytics/yolo/engine/model.py index 017e8e9..f96aac9 100644 --- a/ultralytics/yolo/engine/model.py +++ b/ultralytics/yolo/engine/model.py @@ -228,8 +228,8 @@ class YOLO: if source is None: source = ROOT / 'assets' if is_git_dir() else 'https://ultralytics.com/images/bus.jpg' LOGGER.warning(f"WARNING ⚠️ 'source' is missing. Using 'source={source}'.") - is_cli = sys.argv[0].endswith('yolo') or sys.argv[0].endswith('ultralytics') - + is_cli = (sys.argv[0].endswith('yolo') or sys.argv[0].endswith('ultralytics')) and ( + ('predict' in sys.argv or 'mode=predict' in sys.argv) or ('track' in sys.argv or 'mode=track' in sys.argv)) overrides = self.overrides.copy() overrides['conf'] = 0.25 overrides.update(kwargs) # prefer kwargs