diff --git a/src/utils/ultralytics_16bit_patch.py b/src/utils/ultralytics_16bit_patch.py index adff32d..45ca205 100644 --- a/src/utils/ultralytics_16bit_patch.py +++ b/src/utils/ultralytics_16bit_patch.py @@ -13,6 +13,10 @@ from __future__ import annotations from typing import Optional +from src.utils.logger import get_logger + +logger = get_logger(__name__) + def apply_ultralytics_16bit_tiff_patches(*, force: bool = False) -> None: """Apply runtime monkey-patches to Ultralytics to better support 16-bit TIFFs. @@ -76,8 +80,10 @@ def apply_ultralytics_16bit_tiff_patches(*, force: bool = False) -> None: arr = arr[:, :, :3] # Ensure contiguous array for downstream OpenCV ops. + logger.info(f"Loading with monkey-patched imread: {filename}") return np.ascontiguousarray(arr) + logger.info(f"Loading with original imread: {filename}") return _original_imread(filename, flags) # Patch the canonical reference.