From 334a1c8afeaccb233f164d830b554b2aa44eb3c1 Mon Sep 17 00:00:00 2001 From: Nicholas Pfaff <53228351+nepfaff@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:59:31 -0400 Subject: [PATCH] Make PixelSampler the depth-nerfacto default (#3454) * Make PixelSampler the depth-nerfacto default * Add note about PairPixelSampler and DepthLossType.SPARSENERF_RANKING --- nerfstudio/configs/method_configs.py | 2 -- nerfstudio/models/depth_nerfacto.py | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nerfstudio/configs/method_configs.py b/nerfstudio/configs/method_configs.py index c9bc9f770..9decb99ab 100644 --- a/nerfstudio/configs/method_configs.py +++ b/nerfstudio/configs/method_configs.py @@ -40,7 +40,6 @@ from nerfstudio.data.dataparsers.sitcoms3d_dataparser import Sitcoms3DDataParser from nerfstudio.data.datasets.depth_dataset import DepthDataset from nerfstudio.data.datasets.sdf_dataset import SDFDataset from nerfstudio.data.datasets.semantic_dataset import SemanticDataset -from nerfstudio.data.pixel_samplers import PairPixelSamplerConfig from nerfstudio.engine.optimizers import AdamOptimizerConfig, RAdamOptimizerConfig from nerfstudio.engine.schedulers import ( CosineDecaySchedulerConfig, @@ -222,7 +221,6 @@ method_configs["depth-nerfacto"] = TrainerConfig( pipeline=VanillaPipelineConfig( datamanager=VanillaDataManagerConfig( _target=VanillaDataManager[DepthDataset], - pixel_sampler=PairPixelSamplerConfig(), dataparser=NerfstudioDataParserConfig(), train_num_rays_per_batch=4096, eval_num_rays_per_batch=4096, diff --git a/nerfstudio/models/depth_nerfacto.py b/nerfstudio/models/depth_nerfacto.py index 1a47ab163..ee66a8114 100644 --- a/nerfstudio/models/depth_nerfacto.py +++ b/nerfstudio/models/depth_nerfacto.py @@ -49,7 +49,8 @@ class DepthNerfactoModelConfig(NerfactoModelConfig): sigma_decay_rate: float = 0.99985 """Rate of exponential decay.""" depth_loss_type: DepthLossType = DepthLossType.DS_NERF - """Depth loss type.""" + """Depth loss type. Note that `PairPixelSampler` has to be used for `DepthLossType.SPARSENERF_RANKING` + to work as expected.""" class DepthNerfactoModel(NerfactoModel):