diff --git a/supervision/detection/lmm.py b/supervision/detection/lmm.py index 9cd9e99a..e39e434f 100644 --- a/supervision/detection/lmm.py +++ b/supervision/detection/lmm.py @@ -165,6 +165,9 @@ def from_florence_2( result, str ), f"Expected string as result, got {type(result)}" + if result == "No object detected.": + return np.empty((0, 4), dtype=np.float32), np.array([]), None, None + pattern = re.compile(r"") match = pattern.search(result) assert (