From d72089bb46b1b0b96a4717f842e18e3356fffafc Mon Sep 17 00:00:00 2001 From: jirka <6035284+Borda@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:23:35 +0100 Subject: [PATCH] Add deprecation warning for `denormalize_boxes` in bounding box utilities --- supervision/detection/utils/boxes.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/supervision/detection/utils/boxes.py b/supervision/detection/utils/boxes.py index 52e4b695..0c6d3719 100644 --- a/supervision/detection/utils/boxes.py +++ b/supervision/detection/utils/boxes.py @@ -2,6 +2,7 @@ from __future__ import annotations import numpy as np import numpy.typing as npt +from deprecate import deprecated from supervision.detection.utils.iou_and_nms import box_iou_batch @@ -94,10 +95,16 @@ def pad_boxes(xyxy: np.ndarray, px: int, py: int | None = None) -> np.ndarray: return result +@deprecated( + deprecated_in="0.27", + remove_in="0.30", + args_mapping={"normalized_xyxy": "xyxy"}, +) def denormalize_boxes( xyxy: np.ndarray, resolution_wh: tuple[int, int], normalization_factor: float = 1.0, + normalized_xyxy: np.ndarray = None ) -> np.ndarray: """ Convert normalized bounding box coordinates to absolute pixel coordinates.