From d9f18bd63373f176e5c9314d9cc9cac148ff195d Mon Sep 17 00:00:00 2001 From: Matt Strong <32246357+peasant98@users.noreply.github.com> Date: Fri, 26 Jul 2024 00:41:45 -0700 Subject: [PATCH] Update local_visualizer.py --- mmdet/visualization/local_visualizer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mmdet/visualization/local_visualizer.py b/mmdet/visualization/local_visualizer.py index cc6521c56eb..88fb95825ef 100644 --- a/mmdet/visualization/local_visualizer.py +++ b/mmdet/visualization/local_visualizer.py @@ -278,6 +278,10 @@ def _draw_panoptic_seg(self, image: np.ndarray, self.set_image(image) + # if segms is empty, return the image + if len(segms) == 0: + return self.get_image() + # draw segm polygons = [] for i, mask in enumerate(segms):