From c35a35cefdf8b586bbe325d16d63403ebbb0d6f2 Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Sat, 15 Nov 2025 22:27:11 +0100 Subject: [PATCH] plug Qwen3-VL into `sv.Detections.from_vlm` --- supervision/detection/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervision/detection/core.py b/supervision/detection/core.py index e67f906f..ef88fbfe 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -1558,13 +1558,13 @@ class Detections: if vlm == VLM.QWEN_2_5_VL: xyxy, class_id, class_name = from_qwen_2_5_vl(result, **kwargs) data = {CLASS_NAME_DATA_FIELD: class_name} - confidence = np.ones(len(class_id), dtype=float) + confidence = np.ones(len(xyxy), dtype=float) return cls(xyxy=xyxy, class_id=class_id, confidence=confidence, data=data) if vlm == VLM.QWEN_3_VL: xyxy, class_id, class_name = from_qwen_3_vl(result, **kwargs) data = {CLASS_NAME_DATA_FIELD: class_name} - confidence = np.ones(len(class_id), dtype=float) + confidence = np.ones(len(xyxy), dtype=float) return cls(xyxy=xyxy, class_id=class_id, confidence=confidence, data=data) if vlm == VLM.DEEPSEEK_VL_2: