From 1b6fd01f7e27ab4e9d45ee5970fe44069b226ca6 Mon Sep 17 00:00:00 2001 From: LinasKo Date: Tue, 24 Sep 2024 12:56:24 +0300 Subject: [PATCH] Fix arrya shapes in OBB IoU docstring --- supervision/detection/utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/supervision/detection/utils.py b/supervision/detection/utils.py index e7d1de5a..2a64a6d0 100644 --- a/supervision/detection/utils.py +++ b/supervision/detection/utils.py @@ -145,14 +145,14 @@ def oriented_box_iou_batch( ) -> np.ndarray: """ Compute Intersection over Union (IoU) of two sets of oriented bounding boxes - - `boxes_true` and `boxes_detection`. Both sets - of boxes are expected to be in `(x1, y1, x2, y2, x3, y3, x4, y4)` format. + `boxes_true` and `boxes_detection`. Both sets of boxes are expected to be in + `((x1, y1), (x2, y2), (x3, y3), (x4, y4))` format. Args: - boxes_true (np.ndarray): 2D `np.ndarray` representing ground-truth boxes. - `shape = (N, 8)` where `N` is number of true objects. - boxes_detection (np.ndarray): 2D `np.ndarray` representing detection boxes. - `shape = (M, 8)` where `M` is number of detected objects. + boxes_true (np.ndarray): a `np.ndarray` representing ground-truth boxes. + `shape = (N, 4, 2)` where `N` is number of true objects. + boxes_detection (np.ndarray): a `np.ndarray` representing detection boxes. + `shape = (M, 4, 2)` where `M` is number of detected objects. Returns: np.ndarray: Pairwise IoU of boxes from `boxes_true` and `boxes_detection`.