From 2d1aa3b996762f53e12e5bcf101a58a04cbfe307 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Wed, 24 Jan 2024 12:52:34 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20supervision/detection/to?= =?UTF-8?q?ols/inference=5Fslicer.py=20>>>/...=20removed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- .../detection/tools/inference_slicer.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/supervision/detection/tools/inference_slicer.py b/supervision/detection/tools/inference_slicer.py index 2c0c48a6..7157723f 100644 --- a/supervision/detection/tools/inference_slicer.py +++ b/supervision/detection/tools/inference_slicer.py @@ -77,20 +77,20 @@ class InferenceSlicer: Example: ```python - >>> import cv2 - >>> import supervision as sv - >>> from ultralytics import YOLO + import cv2 + import supervision as sv + from ultralytics import YOLO - >>> image = cv2.imread(SOURCE_IMAGE_PATH) - >>> model = YOLO(...) + image = cv2.imread(SOURCE_IMAGE_PATH) + model = YOLO(...) - >>> def callback(image_slice: np.ndarray) -> sv.Detections: - ... result = model(image_slice)[0] - ... return sv.Detections.from_ultralytics(result) + def callback(image_slice: np.ndarray) -> sv.Detections: + result = model(image_slice)[0] + return sv.Detections.from_ultralytics(result) - >>> slicer = sv.InferenceSlicer(callback = callback) + slicer = sv.InferenceSlicer(callback = callback) - >>> detections = slicer(image) + detections = slicer(image) ``` """ detections_list = []