From 0ab5c7eabda8ff3629bdff010dea2ee9f80d184b Mon Sep 17 00:00:00 2001 From: Kimrass Date: Thu, 5 Mar 2026 10:54:58 +0900 Subject: [PATCH] Fix ValueError in iou calculation for 1D numpy arrays --- src/grits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grits.py b/src/grits.py index c9d48280e..c405e3352 100644 --- a/src/grits.py +++ b/src/grits.py @@ -226,8 +226,8 @@ def iou(bbox1, bbox2): """ Compute the intersection-over-union of two bounding boxes. """ - intersection = Rect(bbox1).intersect(bbox2) - union = Rect(bbox1).include_rect(bbox2) + intersection = Rect(list(bbox1)).intersect(list(bbox2)) + union = Rect(list(bbox1)).include_rect(list(bbox2)) union_area = union.get_area() if union_area > 0: