From 962f093736ffe55c089bc618842a8b8567318c8c Mon Sep 17 00:00:00 2001 From: chbehrens Date: Wed, 17 Jan 2024 09:23:50 +0100 Subject: [PATCH 1/2] [Fix] Replace np.long with np.int64 (#2872) Co-authored-by: Christian Behrens <9531979+chbehrens@users.noreply.github.com> --- mmdet3d/datasets/transforms/dbsampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdet3d/datasets/transforms/dbsampler.py b/mmdet3d/datasets/transforms/dbsampler.py index 56e8440b74..093cdfb170 100644 --- a/mmdet3d/datasets/transforms/dbsampler.py +++ b/mmdet3d/datasets/transforms/dbsampler.py @@ -280,7 +280,7 @@ def sample_all(self, s_points_list.append(s_points) gt_labels = np.array([self.cat2label[s['name']] for s in sampled], - dtype=np.long) + dtype=np.int64) if ground_plane is not None: xyz = sampled_gt_bboxes[:, :3] From 934bcb53def53a2e6d2ded72e507b80652bf2cfb Mon Sep 17 00:00:00 2001 From: Fuyuan Ai Date: Fri, 22 Nov 2024 03:56:36 +0800 Subject: [PATCH 2/2] Fix the problem of failing to save images after open3d visualization. --- mmdet3d/visualization/local_visualizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmdet3d/visualization/local_visualizer.py b/mmdet3d/visualization/local_visualizer.py index d1eff4af97..1bc63701a5 100644 --- a/mmdet3d/visualization/local_visualizer.py +++ b/mmdet3d/visualization/local_visualizer.py @@ -884,7 +884,7 @@ def show(self, self.view_port = \ self.view_control.convert_to_pinhole_camera_parameters() # noqa: E501 self.flag_next = False - self.o3d_vis.clear_geometries() + # self.o3d_vis.clear_geometries() try: del self.pcd except (KeyError, AttributeError): @@ -893,7 +893,7 @@ def show(self, if not (save_path.endswith('.png') or save_path.endswith('.jpg')): save_path += '.png' - self.o3d_vis.capture_screen_image(save_path) + self.o3d_vis.capture_screen_image(save_path, do_render=True) if self.flag_exit: self.o3d_vis.destroy_window() self.o3d_vis.close()