From 07cb0d8ccfdf2511e5839c2f46e111d6093eb362 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:50:43 +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/keypoint/core.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/supervision/keypoint/core.py b/supervision/keypoint/core.py index 79008683b..16e28845a 100644 --- a/supervision/keypoint/core.py +++ b/supervision/keypoint/core.py @@ -23,7 +23,7 @@ class simplifies data manipulation and filtering, providing a uniform API for === "Ultralytics" Use [`sv.KeyPoints.from_ultralytics`](/keypoint/core/#supervision.keypoint.core.KeyPoints.from_ultralytics) - method, which accepts [YOLOv8](https://github.com/ultralytics/ultralytics) + method, which accepts [YOLOv8](https://github.com/ultralytics/ultralytics) pose result. ```python @@ -33,16 +33,16 @@ class simplifies data manipulation and filtering, providing a uniform API for image = cv2.imread() model = YOLO('yolov8s-pose.pt') - + result = model(image)[0] key_points = sv.KeyPoints.from_ultralytics(result) ``` - + === "Inference" - + Use [`sv.KeyPoints.from_inference`](/keypoint/core/#supervision.keypoint.core.KeyPoints.from_inference) method, which accepts [Inference](https://inference.roboflow.com/) pose result. - + ```python import cv2 import supervision as sv @@ -54,13 +54,13 @@ class simplifies data manipulation and filtering, providing a uniform API for result = model.infer(image)[0] key_points = sv.KeyPoints.from_inference(result) ``` - + === "MediaPipe" - + Use [`sv.KeyPoints.from_mediapipe`](/keypoint/core/#supervision.keypoint.core.KeyPoints.from_mediapipe) - method, which accepts [MediaPipe](https://github.com/google-ai-edge/mediapipe) + method, which accepts [MediaPipe](https://github.com/google-ai-edge/mediapipe) pose result. - + ```python import cv2 import mediapipe as mp @@ -238,23 +238,23 @@ def from_mediapipe( cls, mediapipe_results, resolution_wh: Tuple[int, int] ) -> KeyPoints: """ - Creates a `sv.KeyPoints` instance from a + Creates a `sv.KeyPoints` instance from a [MediaPipe](https://github.com/google-ai-edge/mediapipe) pose landmark detection inference result. Args: - mediapipe_results (Union[PoseLandmarkerResult, SolutionOutputs]): + mediapipe_results (Union[PoseLandmarkerResult, SolutionOutputs]): The output results from Mediapipe. It supports both: the inference result `PoseLandmarker` and the legacy one from `Pose`. resolution_wh (Tuple[int, int]): A tuple of the form `(width, height)` representing the resolution of the frame. Returns: - A `sv.KeyPoints` object containing the keypoint coordinates and + A `sv.KeyPoints` object containing the keypoint coordinates and confidences of each keypoint. - + !!! tip - Before you start, download model bundles from the + Before you start, download model bundles from the [MediaPipe website](https://ai.google.dev/edge/mediapipe/solutions/vision/pose_landmarker/index#models). Examples: @@ -358,7 +358,7 @@ def from_ultralytics(cls, ultralytics_results) -> KeyPoints: @classmethod def from_yolo_nas(cls, yolo_nas_results) -> KeyPoints: """ - Create a `sv.KeyPoints` instance from a [YOLO-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS-POSE.md) + Create a `sv.KeyPoints` instance from a [YOLO-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS-POSE.md) pose inference results. Args: