diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 1b84830e9d..660ab445fa 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, GPL-3.0 license -__version__ = "8.0.2" +__version__ = "8.0.3" from ultralytics.hub import checks from ultralytics.yolo.engine.model import YOLO diff --git a/ultralytics/yolo/engine/predictor.py b/ultralytics/yolo/engine/predictor.py index 309e7d10e1..efbd78fb23 100644 --- a/ultralytics/yolo/engine/predictor.py +++ b/ultralytics/yolo/engine/predictor.py @@ -124,9 +124,8 @@ class BasePredictor: # Dataloader bs = 1 # batch_size - if self.args.show: - self.args.show = check_imshow(warn=True) if webcam: + self.args.show = check_imshow(warn=True) self.dataset = LoadStreams(source, imgsz=imgsz, stride=stride, diff --git a/ultralytics/yolo/utils/__init__.py b/ultralytics/yolo/utils/__init__.py index 3366222845..e6747c5ca1 100644 --- a/ultralytics/yolo/utils/__init__.py +++ b/ultralytics/yolo/utils/__init__.py @@ -119,8 +119,12 @@ def is_docker() -> bool: Returns: bool: True if the script is running inside a Docker container, False otherwise. """ - with open('/proc/self/cgroup') as f: - return 'docker' in f.read() + file = Path('/proc/self/cgroup') + if file.exists(): + with open(file) as f: + return 'docker' in f.read() + else: + return False def is_git_directory() -> bool: