Skip to content

Commit f604fd9

Browse files
Fixing Assertion issues when exporting NeRFs to poisson meshes and pointclouds (#3587)
fixing assertion issues for a successful poissonMesh and pointcloud export
1 parent 4a3e3e6 commit f604fd9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

nerfstudio/scripts/exporter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ def main(self) -> None:
141141
pipeline.datamanager,
142142
(VanillaDataManager, ParallelDataManager),
143143
)
144-
assert pipeline.datamanager.train_pixel_sampler is not None
145-
pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch
144+
if isinstance(pipeline.datamanager, VanillaDataManager):
145+
assert pipeline.datamanager.train_pixel_sampler is not None
146+
pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch
146147

147148
# Whether the normals should be estimated based on the point cloud.
148149
estimate_normals = self.normal_method == "open3d"
@@ -329,8 +330,9 @@ def main(self) -> None:
329330
pipeline.datamanager,
330331
(VanillaDataManager, ParallelDataManager),
331332
)
332-
assert pipeline.datamanager.train_pixel_sampler is not None
333-
pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch
333+
if isinstance(pipeline.datamanager, VanillaDataManager):
334+
assert pipeline.datamanager.train_pixel_sampler is not None
335+
pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch
334336

335337
# Whether the normals should be estimated based on the point cloud.
336338
estimate_normals = self.normal_method == "open3d"

0 commit comments

Comments
 (0)