From 53f2b4fd455712eefbe1bddeb40b280252ad1969 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:24:52 +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 --- docs/detection/annotate.md | 2 +- supervision/annotators/core.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/detection/annotate.md b/docs/detection/annotate.md index 8568139f..cc0be9fc 100644 --- a/docs/detection/annotate.md +++ b/docs/detection/annotate.md @@ -16,4 +16,4 @@ ## LabelAnnotator -:::supervision.annotators.core.LabelAnnotator \ No newline at end of file +:::supervision.annotators.core.LabelAnnotator diff --git a/supervision/annotators/core.py b/supervision/annotators/core.py index 51a67ece..b91762b2 100644 --- a/supervision/annotators/core.py +++ b/supervision/annotators/core.py @@ -1,10 +1,7 @@ -import os.path -from collections import defaultdict -from typing import List, Optional, Tuple, Union +from typing import List, Tuple, Union import cv2 import numpy as np -from PIL import Image, ImageDraw, ImageFont from supervision.annotators.base import ( BaseAnnotator, @@ -308,8 +305,9 @@ class BoxCornerAnnotator(BaseAnnotator): class LabelAnnotator: """ - A class for annotating labels on an image using provided detections. - """ + A class for annotating labels on an image using provided detections. + """ + def __init__( self, color: Union[Color, ColorPalette] = ColorPalette.default(),