From 888edfbc67028fd10bc199f33daefc2481877532 Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Mon, 17 Apr 2023 16:36:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20Initial=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervision/{annotation => dataset}/__init__.py | 0 supervision/dataset/core.py | 0 supervision/{annotation => dataset}/voc.py | 0 supervision/detection/annotate.py | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename supervision/{annotation => dataset}/__init__.py (100%) create mode 100644 supervision/dataset/core.py rename supervision/{annotation => dataset}/voc.py (100%) diff --git a/supervision/annotation/__init__.py b/supervision/dataset/__init__.py similarity index 100% rename from supervision/annotation/__init__.py rename to supervision/dataset/__init__.py diff --git a/supervision/dataset/core.py b/supervision/dataset/core.py new file mode 100644 index 00000000..e69de29b diff --git a/supervision/annotation/voc.py b/supervision/dataset/voc.py similarity index 100% rename from supervision/annotation/voc.py rename to supervision/dataset/voc.py diff --git a/supervision/detection/annotate.py b/supervision/detection/annotate.py index e78ee6e2..2e2cb92a 100644 --- a/supervision/detection/annotate.py +++ b/supervision/detection/annotate.py @@ -147,10 +147,10 @@ class MaskAnnotator: Returns: np.ndarray: The image with the masks overlaid """ - for i in range(len(detections.xyxy)): - if detections.mask is None: - continue + if detections.mask is None: + return scene + for i in np.argsort(detections.area): class_id = ( detections.class_id[i] if detections.class_id is not None else None )