From d21fa99509cf5aa5e09dc75c8cb19e20038aed20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Holtvogt?= <35570024+holtvogt@users.noreply.github.com> Date: Wed, 17 Aug 2022 09:40:41 +0200 Subject: [PATCH] Add check for empty prediction labels (#1725) --- mmdet3d/core/visualizer/show_result.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdet3d/core/visualizer/show_result.py b/mmdet3d/core/visualizer/show_result.py index aa732cf47..33cf877b0 100644 --- a/mmdet3d/core/visualizer/show_result.py +++ b/mmdet3d/core/visualizer/show_result.py @@ -103,7 +103,7 @@ def show_result(points, vis = Visualizer(points) if pred_bboxes is not None: - if pred_labels is None: + if pred_labels is None or pred_labels.numel() == 0: vis.add_bboxes(bbox3d=pred_bboxes) else: palette = np.random.randint(