diff --git a/supervision/detection/annotate.py b/supervision/detection/annotate.py index 98c5244e2..e78ee6e29 100644 --- a/supervision/detection/annotate.py +++ b/supervision/detection/annotate.py @@ -121,11 +121,12 @@ def annotate( class MaskAnnotator: """ - A class for overlaying masks on an image using detections provided. + A class for overlaying masks on an image using detections provided. + + Attributes: + color (Union[Color, ColorPalette]): The color to fill the mask, can be a single color or a color palette + """ - Attributes: - color (Union[Color, ColorPalette]): The color to fill the mask, can be a single color or a color palette - """ def __init__( self, color: Union[Color, ColorPalette] = ColorPalette.default(), diff --git a/supervision/detection/tools/polygon_zone.py b/supervision/detection/tools/polygon_zone.py index fb53ea30b..48c3eaa01 100644 --- a/supervision/detection/tools/polygon_zone.py +++ b/supervision/detection/tools/polygon_zone.py @@ -23,6 +23,7 @@ class PolygonZone: current_count (int): The current count of detected objects within the zone mask (np.ndarray): The 2D bool mask for the polygon zone """ + def __init__( self, polygon: np.ndarray, @@ -77,6 +78,7 @@ class PolygonZoneAnnotator: font (int): The font type for the text on the polygon, default is cv2.FONT_HERSHEY_SIMPLEX center (Tuple[int, int]): The center of the polygon for text placement """ + def __init__( self, zone: PolygonZone,