diff --git a/test/detection/test_vlm.py b/test/detection/test_vlm.py index 04e969df..195829c3 100644 --- a/test/detection/test_vlm.py +++ b/test/detection/test_vlm.py @@ -368,21 +368,21 @@ def test_from_qwen_2_5_vl( (1000, 1000), None, (np.empty((0, 4)), None, np.empty(0, dtype=str)), - ), + ), # random text without JSON format ( does_not_raise(), "```json\ninvalid json\n```", (1000, 1000), None, (np.empty((0, 4)), None, np.empty(0, dtype=str)), - ), + ), # invalid JSON within code blocks ( does_not_raise(), "```json\n[]\n```", (1000, 1000), None, (np.empty((0, 4)), None, np.empty(0, dtype=str)), - ), + ), # empty JSON array ( does_not_raise(), """```json @@ -397,7 +397,7 @@ def test_from_qwen_2_5_vl( None, np.array(["cat"], dtype=str), ), - ), + ), # single valid box with coordinate scaling ( does_not_raise(), """```json @@ -413,7 +413,7 @@ def test_from_qwen_2_5_vl( None, np.array(["cat", "dog"], dtype=str), ), - ), + ), # multiple valid boxes without class filtering ( does_not_raise(), """```json @@ -424,7 +424,7 @@ def test_from_qwen_2_5_vl( (640, 480), ["dog", "person"], (np.empty((0, 4)), np.empty(0, dtype=int), np.empty(0, dtype=str)), - ), + ), # class mismatch with filter ( does_not_raise(), """```json @@ -440,7 +440,7 @@ def test_from_qwen_2_5_vl( np.array([1]), np.array(["dog"], dtype=str), ), - ), + ), # partial class filtering ( does_not_raise(), """```json @@ -456,7 +456,7 @@ def test_from_qwen_2_5_vl( np.array([0, 1]), np.array(["cat", "dog"]), ), - ), + ), # complete class filtering with multiple boxes ( pytest.raises(ValueError), """```json @@ -467,7 +467,7 @@ def test_from_qwen_2_5_vl( (0, 480), None, None, - ), + ), # zero resolution width -> ValueError ( pytest.raises(ValueError), """```json @@ -478,7 +478,7 @@ def test_from_qwen_2_5_vl( (640, -100), None, None, - ), + ), # negative resolution height -> ValueError ], ) def test_from_google_gemini(