diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 03ed9568..836031f5 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license -__version__ = "8.3.114" +__version__ = "8.3.115" import os diff --git a/ultralytics/utils/patches.py b/ultralytics/utils/patches.py index 78ab8ab3..a7ca52ca 100644 --- a/ultralytics/utils/patches.py +++ b/ultralytics/utils/patches.py @@ -31,7 +31,8 @@ def imread(filename: str, flags: int = cv2.IMREAD_COLOR): if filename.endswith((".tiff", ".tif")): success, frames = cv2.imdecodemulti(file_bytes, cv2.IMREAD_UNCHANGED) if success: - return np.stack(frames, axis=2) # or np.asarray(frames).transpose(1,2,0) + # handle RGB images in tif/tiff format + return frames[0] if len(frames) == 1 and frames[0].ndim == 3 else np.stack(frames, axis=2) return None else: return cv2.imdecode(file_bytes, flags)