From cce69d893ed18e605bcac107ac82a7fccd23699f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:57:03 +0000 Subject: [PATCH] =?UTF-8?q?fix(pre=5Fcommit):=20=F0=9F=8E=A8=20auto=20form?= =?UTF-8?q?at=20pre-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervision/dataset/formats/yolo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supervision/dataset/formats/yolo.py b/supervision/dataset/formats/yolo.py index f1005a56..9b10f6bf 100644 --- a/supervision/dataset/formats/yolo.py +++ b/supervision/dataset/formats/yolo.py @@ -101,10 +101,12 @@ def yolo_annotations_to_detections( class_id = np.array(class_id, dtype=int) relative_xyxy = np.array(relative_xyxy, dtype=np.float32) xyxy = relative_xyxy * np.array([w, h, w, h], dtype=np.float32) - + if is_obb: relative_xyxyxyxy = np.array(relative_xyxyxyxy, dtype=np.float32) - xyxyxyxy = relative_xyxyxyxy * np.array([w, h, w, h, w, h, w, h], dtype=np.float32) + xyxyxyxy = relative_xyxyxyxy * np.array( + [w, h, w, h, w, h, w, h], dtype=np.float32 + ) data = {ORIENTED_BOX_COORDINATES: xyxyxyxy} if not with_masks: