Skip to content

Commit 4618392

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent 9a2b921 commit 4618392

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎supervision/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
xcycwh_to_xyxy,
7777
xywh_to_xyxy,
7878
xyxy_to_polygons,
79-
xyxy_to_xywh,
8079
xyxy_to_xyah,
80+
xyxy_to_xywh,
8181
)
8282
from supervision.detection.vlm import LMM, VLM
8383
from supervision.draw.color import Color, ColorPalette
@@ -226,6 +226,6 @@
226226
"xcycwh_to_xyxy",
227227
"xywh_to_xyxy",
228228
"xyxy_to_polygons",
229-
"xyxy_to_xywh",
230229
"xyxy_to_xyah",
230+
"xyxy_to_xywh",
231231
]

‎supervision/detection/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,10 @@ def xcycwh_to_xyxy(xcycwh: np.ndarray) -> np.ndarray:
396396
xyxy[:, 3] = xcycwh[:, 1] + xcycwh[:, 3] / 2
397397
return xyxy
398398

399+
399400
def xyxy_to_xyah(xyxy: np.ndarray) -> np.ndarray:
400401
"""
401-
Converts bounding box coordinates from `(x_min, y_min, x_max, y_max)`
402+
Converts bounding box coordinates from `(x_min, y_min, x_max, y_max)`
402403
into measurement space to format `(center x, center y, aspect ratio, height)`,
403404
where the aspect ratio is `width / height`.
404405

0 commit comments

Comments
 (0)