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(),