Fixing Assertion issues when exporting NeRFs to poisson meshes and pointclouds (#3587)

fixing assertion issues for a successful poissonMesh and pointcloud export
This commit is contained in:
Anthony Zhang authored and GitHub committed 2025-02-09 23:05:31 -08:00
1 parent 4a3e3e6403
commit f604fd960e
1 file changed
+6 -4
+6 -4
View File
@@ -141,8 +141,9 @@ class ExportPointCloud(Exporter):
pipeline.datamanager, pipeline.datamanager,
(VanillaDataManager, ParallelDataManager), (VanillaDataManager, ParallelDataManager),
) )
assert pipeline.datamanager.train_pixel_sampler is not None if isinstance(pipeline.datamanager, VanillaDataManager):
pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch 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. # Whether the normals should be estimated based on the point cloud.
estimate_normals = self.normal_method == "open3d" estimate_normals = self.normal_method == "open3d"
@@ -329,8 +330,9 @@ class ExportPoissonMesh(Exporter):
pipeline.datamanager, pipeline.datamanager,
(VanillaDataManager, ParallelDataManager), (VanillaDataManager, ParallelDataManager),
) )
assert pipeline.datamanager.train_pixel_sampler is not None if isinstance(pipeline.datamanager, VanillaDataManager):
pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch 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. # Whether the normals should be estimated based on the point cloud.
estimate_normals = self.normal_method == "open3d" estimate_normals = self.normal_method == "open3d"