4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-10 18:17:31 +08:00

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 2025-02-09 23:05:31 -08:00 committed by GitHub
parent 4a3e3e6403
commit f604fd960e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"