From f604fd960e289b450533bdaa846189df6dbf2a85 Mon Sep 17 00:00:00 2001 From: Anthony Zhang <47730496+AntonioMacaronio@users.noreply.github.com> Date: Sun, 9 Feb 2025 23:05:31 -0800 Subject: [PATCH] Fixing Assertion issues when exporting NeRFs to poisson meshes and pointclouds (#3587) fixing assertion issues for a successful poissonMesh and pointcloud export --- nerfstudio/scripts/exporter.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nerfstudio/scripts/exporter.py b/nerfstudio/scripts/exporter.py index be8d48a24..528b2f3aa 100644 --- a/nerfstudio/scripts/exporter.py +++ b/nerfstudio/scripts/exporter.py @@ -141,8 +141,9 @@ class ExportPointCloud(Exporter): pipeline.datamanager, (VanillaDataManager, ParallelDataManager), ) - assert pipeline.datamanager.train_pixel_sampler is not None - pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch + if isinstance(pipeline.datamanager, VanillaDataManager): + assert pipeline.datamanager.train_pixel_sampler is not None + pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch # Whether the normals should be estimated based on the point cloud. estimate_normals = self.normal_method == "open3d" @@ -329,8 +330,9 @@ class ExportPoissonMesh(Exporter): pipeline.datamanager, (VanillaDataManager, ParallelDataManager), ) - assert pipeline.datamanager.train_pixel_sampler is not None - pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch + if isinstance(pipeline.datamanager, VanillaDataManager): + assert pipeline.datamanager.train_pixel_sampler is not None + pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch # Whether the normals should be estimated based on the point cloud. estimate_normals = self.normal_method == "open3d"