From 74d12a55423baabab618e281e8c66132ddbe2f53 Mon Sep 17 00:00:00 2001 From: Matthew Tancik Date: Thu, 2 Mar 2023 10:14:20 -0800 Subject: [PATCH] Speed up point cloud export (#1547) --- nerfstudio/exporter/exporter_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nerfstudio/exporter/exporter_utils.py b/nerfstudio/exporter/exporter_utils.py index 9f4168517..2f45badab 100644 --- a/nerfstudio/exporter/exporter_utils.py +++ b/nerfstudio/exporter/exporter_utils.py @@ -178,8 +178,8 @@ def generate_point_cloud( rgbs = torch.cat(rgbs, dim=0) pcd = o3d.geometry.PointCloud() - pcd.points = o3d.utility.Vector3dVector(points.float().cpu().numpy()) - pcd.colors = o3d.utility.Vector3dVector(rgbs.float().cpu().numpy()) + pcd.points = o3d.utility.Vector3dVector(points.double().cpu().numpy()) + pcd.colors = o3d.utility.Vector3dVector(rgbs.double().cpu().numpy()) ind = None if remove_outliers: @@ -203,7 +203,7 @@ def generate_point_cloud( if ind is not None: # mask out normals for points that were removed with remove_outliers normals = normals[ind] - pcd.normals = o3d.utility.Vector3dVector(normals.float().cpu().numpy()) + pcd.normals = o3d.utility.Vector3dVector(normals.double().cpu().numpy()) return pcd