From 2d9bbe509153342ddd4130323c99a63d61214bed Mon Sep 17 00:00:00 2001 From: dberga Date: Thu, 11 Apr 2024 04:04:33 +0200 Subject: [PATCH] fix exporter.py for FullImageDataManager and RandomCamerasDataManager (#3065) * fix exporter.py for FullImageDataManager and RandomCamerasDataManager * sort imports * ruff --------- Co-authored-by: Brent Yi --- nerfstudio/scripts/exporter.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nerfstudio/scripts/exporter.py b/nerfstudio/scripts/exporter.py index 467ad88f3..29c7ebc22 100644 --- a/nerfstudio/scripts/exporter.py +++ b/nerfstudio/scripts/exporter.py @@ -35,7 +35,9 @@ from typing_extensions import Annotated, Literal from nerfstudio.cameras.rays import RayBundle from nerfstudio.data.datamanagers.base_datamanager import VanillaDataManager +from nerfstudio.data.datamanagers.full_images_datamanager import FullImageDatamanager from nerfstudio.data.datamanagers.parallel_datamanager import ParallelDataManager +from nerfstudio.data.datamanagers.random_cameras_datamanager import RandomCamerasDataManager from nerfstudio.data.scene_box import OrientedBox from nerfstudio.exporter import texture_utils, tsdf_utils from nerfstudio.exporter.exporter_utils import collect_camera_poses, generate_point_cloud, get_mesh_from_filename @@ -137,7 +139,10 @@ class ExportPointCloud(Exporter): validate_pipeline(self.normal_method, self.normal_output_name, pipeline) # Increase the batchsize to speed up the evaluation. - assert isinstance(pipeline.datamanager, (VanillaDataManager, ParallelDataManager)) + assert isinstance( + pipeline.datamanager, + (VanillaDataManager, ParallelDataManager, FullImageDatamanager, RandomCamerasDataManager), + ) assert pipeline.datamanager.train_pixel_sampler is not None pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch @@ -318,7 +323,10 @@ class ExportPoissonMesh(Exporter): validate_pipeline(self.normal_method, self.normal_output_name, pipeline) # Increase the batchsize to speed up the evaluation. - assert isinstance(pipeline.datamanager, (VanillaDataManager, ParallelDataManager)) + assert isinstance( + pipeline.datamanager, + (VanillaDataManager, ParallelDataManager, FullImageDatamanager, RandomCamerasDataManager), + ) assert pipeline.datamanager.train_pixel_sampler is not None pipeline.datamanager.train_pixel_sampler.num_rays_per_batch = self.num_rays_per_batch