diff --git a/nerfstudio/configs/method_configs.py b/nerfstudio/configs/method_configs.py index a78823995..e0f5a3d65 100644 --- a/nerfstudio/configs/method_configs.py +++ b/nerfstudio/configs/method_configs.py @@ -222,7 +222,7 @@ method_configs["depth-nerfacto"] = TrainerConfig( _target=VanillaDataManager[DepthDataset], pixel_sampler=PairPixelSamplerConfig(), dataparser=NerfstudioDataParserConfig(), - train_num_rays_per_batch=4096, + train_num_rays_per_batch=32768, eval_num_rays_per_batch=4096, ), model=DepthNerfactoModelConfig( diff --git a/nerfstudio/models/depth_nerfacto.py b/nerfstudio/models/depth_nerfacto.py index 1a47ab163..5cc980c0c 100644 --- a/nerfstudio/models/depth_nerfacto.py +++ b/nerfstudio/models/depth_nerfacto.py @@ -29,6 +29,7 @@ from nerfstudio.model_components import losses from nerfstudio.model_components.losses import DepthLossType, depth_loss, depth_ranking_loss from nerfstudio.models.nerfacto import NerfactoModel, NerfactoModelConfig from nerfstudio.utils import colormaps +from nerfstudio.model_components.scene_colliders import AABBBoxCollider @dataclass @@ -70,6 +71,10 @@ class DepthNerfactoModel(NerfactoModel): else: self.depth_sigma = torch.tensor([self.config.depth_sigma]) + # self.collider = NearFarCollider(near_plane=self.config.near_plane, far_plane=self.config.far_plane) + # import pdb; pdb.set_trace(); + self.collider = AABBBoxCollider(scene_box=self.scene_box) + def get_outputs(self, ray_bundle: RayBundle): outputs = super().get_outputs(ray_bundle) if ray_bundle.metadata is not None and "directions_norm" in ray_bundle.metadata: