From 64d223b76d699fa8a2dd35cb8e9da9605589644c Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Sun, 2 Jul 2023 23:28:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=A4=20make=20black=20happy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervision/annotators/core.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/supervision/annotators/core.py b/supervision/annotators/core.py index 137f60b2..9e477a1a 100644 --- a/supervision/annotators/core.py +++ b/supervision/annotators/core.py @@ -3,8 +3,8 @@ from typing import Union import numpy as np -from supervision.draw.color import Color, ColorPalette from supervision.detection.core import Detections +from supervision.draw.color import Color, ColorPalette class BaseAnnotator(ABC): @@ -14,7 +14,6 @@ class BaseAnnotator(ABC): class BoxAnnotator(BaseAnnotator): - def annotate(self, scene: np.ndarray, detections: Detections) -> np.ndarray: pass @@ -27,10 +26,11 @@ class MaskAnnotator(BaseAnnotator): color (Union[Color, ColorPalette]): The color to fill the mask, can be a single color or a color palette opacity (float): The opacity of the masks, between 0 and 1. """ + def __init__( self, color: Union[Color, ColorPalette] = ColorPalette.default(), - opacity: float = 0.5 + opacity: float = 0.5, ): self.color: Union[Color, ColorPalette] = color self.opacity = opacity @@ -74,24 +74,20 @@ class MaskAnnotator(BaseAnnotator): class LabelAnnotator(BaseAnnotator): - def annotate(self, scene: np.ndarray, detections: Detections) -> np.ndarray: pass class PillowLabelAnnotator(BaseAnnotator): - def annotate(self, scene: np.ndarray, detections: Detections) -> np.ndarray: pass class TrackAnnotator(BaseAnnotator): - def annotate(self, scene: np.ndarray, detections: Detections) -> np.ndarray: pass class BoxMaskAnnotator(BaseAnnotator): - def annotate(self, scene: np.ndarray, detections: Detections) -> np.ndarray: - pass \ No newline at end of file + pass