From 4f513ce2758c82431dfdce6ac64b5ab6c0b8a4b2 Mon Sep 17 00:00:00 2001 From: Akash A Desai <62583018+akashAD98@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:41:13 +0530 Subject: [PATCH] Update core.py remoed class_list arg from core.py file --- supervision/detection/core.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/supervision/detection/core.py b/supervision/detection/core.py index f7f1bb5f..3b64c6ae 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -432,7 +432,7 @@ class Detections: ) @classmethod - def from_roboflow(cls, roboflow_result: dict, class_list: List[str]) -> Detections: + def from_roboflow(cls, roboflow_result: dict) -> Detections: """ Create a Detections object from the [Roboflow](https://roboflow.com/) API inference result. @@ -440,8 +440,6 @@ class Detections: Args: roboflow_result (dict): The result from the Roboflow API containing predictions. - class_list (List[str]): A list of class names - corresponding to the class IDs in the API result. Returns: (Detections): A Detections object containing the bounding boxes, class IDs, @@ -464,13 +462,12 @@ class Detections: ... # ... more predictions ... ... ] ... } - >>> class_list = ["person", "car", "dog"] - >>> detections = sv.Detections.from_roboflow(roboflow_result, class_list) + >>> detections = sv.Detections.from_roboflow(roboflow_result) ``` """ xyxy, confidence, class_id, masks = process_roboflow_result( - roboflow_result=roboflow_result, class_list=class_list + roboflow_result=roboflow_result ) if np.asarray(xyxy).shape[0] == 0: