Skip to content

Commit

Permalink
fix(pre_commit): 🎨 auto format pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 3, 2024
1 parent 80380d1 commit 57ccc18
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions supervision/detection/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,11 @@ def scale_boxes(
return np.concatenate((centers - new_sizes / 2, centers + new_sizes / 2), axis=1)



def resolve_letterbox(xyxy: npt.NDArray[np.float64],
letterbox_wh: Tuple[int, int],
resolution_wh: Tuple[int, int]) -> npt.NDArray[np.float64]:
def resolve_letterbox(
xyxy: npt.NDArray[np.float64],
letterbox_wh: Tuple[int, int],
resolution_wh: Tuple[int, int],
) -> npt.NDArray[np.float64]:
"""
Resolves the bounding box coordinates from letterbox format
to the required resolution.
Expand Down Expand Up @@ -794,7 +795,7 @@ def resolve_letterbox(xyxy: npt.NDArray[np.float64],

scale = input_w / width_new

padding_top = (letterbox_h - height_new) // 2
padding_top = (letterbox_h - height_new) // 2
padding_left = (letterbox_w - width_new) // 2

boxes = xyxy.copy()
Expand Down

0 comments on commit 57ccc18

Please sign in to comment.