From d4e0d8d46d1c7ce08e40c508333f1bc44a1462b2 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Wed, 24 Jan 2024 15:40:08 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20supervision/annotators/c?= =?UTF-8?q?ore.py=20PercentageBarAnnotator=20>>>/...=20removed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- docs/annotators.md | 16 ++++++++-------- supervision/annotators/core.py | 16 ++++++++-------- supervision/geometry/utils.py | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/annotators.md b/docs/annotators.md index 75a01802..3731b63c 100644 --- a/docs/annotators.md +++ b/docs/annotators.md @@ -194,16 +194,16 @@ comments: true === "PercentageBar" ```python - >>> import supervision as sv + import supervision as sv - >>> image = ... - >>> detections = sv.Detections(...) + image = ... + detections = sv.Detections(...) - >>> percentage_bar_annotator = sv.PercentageBarAnnotator() - >>> annotated_frame = percentage_bar_annotator.annotate( - ... scene=image.copy(), - ... detections=detections - ... ) + percentage_bar_annotator = sv.PercentageBarAnnotator() + annotated_frame = percentage_bar_annotator.annotate( + scene=image.copy(), + detections=detections + ) ```
diff --git a/supervision/annotators/core.py b/supervision/annotators/core.py index f128631c..4e8b634b 100644 --- a/supervision/annotators/core.py +++ b/supervision/annotators/core.py @@ -1562,16 +1562,16 @@ class PercentageBarAnnotator(BaseAnnotator): Example: ```python - >>> import supervision as sv + import supervision as sv - >>> image = ... - >>> detections = sv.Detections(...) + image = ... + detections = sv.Detections(...) - >>> percentage_bar_annotator = sv.BoundingBoxAnnotator() - >>> annotated_frame = percentage_bar_annotator.annotate( - ... scene=image.copy(), - ... detections=detections - ... ) + percentage_bar_annotator = sv.BoundingBoxAnnotator() + annotated_frame = percentage_bar_annotator.annotate( + scene=image.copy(), + detections=detections + ) ``` ![percentage-bar-example](https://media.roboflow.com/ diff --git a/supervision/geometry/utils.py b/supervision/geometry/utils.py index 6069ca7f..dd4e64db 100644 --- a/supervision/geometry/utils.py +++ b/supervision/geometry/utils.py @@ -24,7 +24,7 @@ def get_polygon_center(polygon: np.ndarray) -> Point: ```python from supervision.geometry.utils import get_polygon_center import numpy as np - + vertices = np.array([[0, 0], [0, 1], [1, 1], [1, 0]]) get_center(vertices) Point(x=0.5, y=0.5)