Adding logger

This commit is contained in:
2025-12-18 12:04:41 +02:00
parent 7d83e9b9b1
commit 5e9d3b1dc4

View File

@@ -13,6 +13,10 @@ from __future__ import annotations
from typing import Optional 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: def apply_ultralytics_16bit_tiff_patches(*, force: bool = False) -> None:
"""Apply runtime monkey-patches to Ultralytics to better support 16-bit TIFFs. """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] arr = arr[:, :, :3]
# Ensure contiguous array for downstream OpenCV ops. # Ensure contiguous array for downstream OpenCV ops.
logger.info(f"Loading with monkey-patched imread: {filename}")
return np.ascontiguousarray(arr) return np.ascontiguousarray(arr)
logger.info(f"Loading with original imread: {filename}")
return _original_imread(filename, flags) return _original_imread(filename, flags)
# Patch the canonical reference. # Patch the canonical reference.