From 23e63501eb795ee7a0dc3cdc3b2a36e2f04df765 Mon Sep 17 00:00:00 2001 From: LinasKo Date: Thu, 20 Jun 2024 21:35:49 +0300 Subject: [PATCH] fix, from_florence_2: extra dimension for xyxy, REGION_TO_CATEGORY --- supervision/detection/lmm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervision/detection/lmm.py b/supervision/detection/lmm.py index c450403b..30e5ded9 100644 --- a/supervision/detection/lmm.py +++ b/supervision/detection/lmm.py @@ -177,7 +177,7 @@ def from_florence_2( match is not None ), f"Expected string to end in location tags, but got {result}" - xyxy = np.array(match.groups(), dtype=np.float32) + xyxy = np.array([match.groups()], dtype=np.float32) result_string = result[: match.start()] labels = np.array([result_string]) return xyxy, labels, None, None