From 8fb8432e8bd140117e8214919aa060d8ea481981 Mon Sep 17 00:00:00 2001 From: Hardik Dava Date: Fri, 11 Aug 2023 19:33:09 +0200 Subject: [PATCH] fixed style --- supervision/__init__.py | 35 ++++++++++----------------- supervision/detection/core.py | 9 +++---- supervision/detection/tools/slicer.py | 2 +- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/supervision/__init__.py b/supervision/__init__.py index 8dc27383..dea8511b 100644 --- a/supervision/__init__.py +++ b/supervision/__init__.py @@ -8,36 +8,27 @@ except importlib_metadata.PackageNotFoundError: from supervision.classification.core import Classifications -from supervision.dataset.core import ( - BaseDataset, - ClassificationDataset, - DetectionDataset, -) +from supervision.dataset.core import (BaseDataset, ClassificationDataset, + DetectionDataset) from supervision.detection.annotate import BoxAnnotator, MaskAnnotator from supervision.detection.core import Detections from supervision.detection.line_counter import LineZone, LineZoneAnnotator -from supervision.detection.tools.polygon_zone import PolygonZone, PolygonZoneAnnotator +from supervision.detection.tools.polygon_zone import (PolygonZone, + PolygonZoneAnnotator) from supervision.detection.tools.slicer import Slicer -from supervision.detection.utils import ( - box_iou_batch, - filter_polygons_by_area, - mask_to_polygons, - mask_to_xyxy, - non_max_suppression, - polygon_to_mask, - polygon_to_xyxy, -) +from supervision.detection.utils import (box_iou_batch, + filter_polygons_by_area, + mask_to_polygons, mask_to_xyxy, + non_max_suppression, polygon_to_mask, + polygon_to_xyxy) from supervision.draw.color import Color, ColorPalette -from supervision.draw.utils import draw_filled_rectangle, draw_polygon, draw_text +from supervision.draw.utils import (draw_filled_rectangle, draw_polygon, + draw_text) from supervision.geometry.core import Point, Position, Rect from supervision.geometry.utils import get_polygon_center from supervision.metrics.detection import ConfusionMatrix, MeanAveragePrecision from supervision.utils.file import list_files_with_extensions from supervision.utils.image import ImageSink, crop from supervision.utils.notebook import plot_image, plot_images_grid -from supervision.utils.video import ( - VideoInfo, - VideoSink, - get_video_frames_generator, - process_video, -) +from supervision.utils.video import (VideoInfo, VideoSink, + get_video_frames_generator, process_video) diff --git a/supervision/detection/core.py b/supervision/detection/core.py index a7e805a4..9ceb94b8 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -6,12 +6,9 @@ from typing import Any, Iterator, List, Optional, Tuple, Union import cv2 import numpy as np -from supervision.detection.utils import ( - extract_ultralytics_masks, - non_max_suppression, - process_roboflow_result, - xywh_to_xyxy, -) +from supervision.detection.utils import (extract_ultralytics_masks, + non_max_suppression, + process_roboflow_result, xywh_to_xyxy) from supervision.geometry.core import Position from supervision.utils.internal import deprecated diff --git a/supervision/detection/tools/slicer.py b/supervision/detection/tools/slicer.py index 15b9fce1..d43f0304 100644 --- a/supervision/detection/tools/slicer.py +++ b/supervision/detection/tools/slicer.py @@ -124,4 +124,4 @@ class Slicer: return detection xyxy = move_boxes(boxes=detection.xyxy, offset=offset) detection.xyxy = xyxy - return detection \ No newline at end of file + return detection