From f906a2978fc891444e139301df9b0c764cb6d199 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 12:43:55 +0000 Subject: [PATCH] =?UTF-8?q?fix(pre=5Fcommit):=20=F0=9F=8E=A8=20auto=20form?= =?UTF-8?q?at=20pre-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervision/detection/core.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/supervision/detection/core.py b/supervision/detection/core.py index cb623026..530f7cfa 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -9,12 +9,6 @@ from supervision.config import ( CLASS_NAME_DATA_FIELD, ORIENTED_BOX_COORDINATES, ) -from supervision.detection.vlm import ( - LMM, - from_florence_2, - from_paligemma, - validate_vlm_parameters, VLM, from_qwen_2_5_vl, -) from supervision.detection.overlap_filter import ( box_non_max_merge, box_non_max_suppression, @@ -38,8 +32,16 @@ from supervision.detection.utils import ( process_roboflow_result, xywh_to_xyxy, ) +from supervision.detection.vlm import ( + LMM, + VLM, + from_florence_2, + from_paligemma, + from_qwen_2_5_vl, + validate_vlm_parameters, +) from supervision.geometry.core import Position -from supervision.utils.internal import get_instance_variables, deprecated +from supervision.utils.internal import deprecated, get_instance_variables from supervision.validators import validate_detections_fields @@ -845,7 +847,7 @@ class Detections: lmm_to_vlm = { LMM.PALIGEMMA: VLM.PALIGEMMA, LMM.FLORENCE_2: VLM.FLORENCE_2, - LMM.QWEN_2_5_VL: VLM.QWEN_2_5_VL + LMM.QWEN_2_5_VL: VLM.QWEN_2_5_VL, } if lmm in LMM: @@ -869,7 +871,9 @@ class Detections: return cls.from_vlm(vlm=vlm, result=result, **kwargs) @classmethod - def from_vlm(cls, vlm: Union[VLM, str], result: Union[str, dict], **kwargs: Any) -> Detections: + def from_vlm( + cls, vlm: Union[VLM, str], result: Union[str, dict], **kwargs: Any + ) -> Detections: vlm = validate_vlm_parameters(vlm, result, kwargs) if vlm == VLM.PALIGEMMA: