From 0dce69a164f2258372d094e88dc2ddebed127353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Komorowicz?= Date: Wed, 15 Jan 2025 22:37:02 +0100 Subject: [PATCH] Add color transient config to nerfacto --- nerfstudio/models/nerfacto.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nerfstudio/models/nerfacto.py b/nerfstudio/models/nerfacto.py index 6790978988..be020ca60a 100644 --- a/nerfstudio/models/nerfacto.py +++ b/nerfstudio/models/nerfacto.py @@ -63,8 +63,12 @@ class NerfactoModelConfig(ModelConfig): """Dimension of hidden layers""" hidden_dim_color: int = 64 """Dimension of hidden layers for color network""" - hidden_dim_transient: int = 64 + use_transient_embedding: bool = True + """Whether to use an transient embedding.""" + hidden_dim_transient: int = 128 """Dimension of hidden layers for transient network""" + transient_embed_dim: int = 16 + """Dimension of the transient embedding.""" num_levels: int = 16 """Number of levels of the hashmap for the base mlp.""" base_res: int = 16 @@ -162,7 +166,9 @@ def populate_modules(self): features_per_level=self.config.features_per_level, log2_hashmap_size=self.config.log2_hashmap_size, hidden_dim_color=self.config.hidden_dim_color, + use_transient_embedding=self.config.use_transient_embedding, hidden_dim_transient=self.config.hidden_dim_transient, + transient_embedding_dim=self.config.transient_embed_dim, spatial_distortion=scene_contraction, num_images=self.num_train_data, use_pred_normals=self.config.predict_normals,