mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 07:18:57 +08:00
Terrance/combined model (#402)
* adding spatial distortion to instantngp field * adding scene contraction to instant ngp * rename compound, fixing configs * adding nerfw conditioning * added appearance embeddings, scene contraction disabled * adding docstrings
This commit is contained in:
1 parent
e516e668b9
commit
47ea7b5b72
4 files changed
+416
No files matched your search
@@ -38,6 +38,7 @@ from nerfactory.datamanagers.dataparsers.record3d_parser import Record3D
|
||||
|
||||
# model instances
|
||||
from nerfactory.models.base import Model
|
||||
from nerfactory.models.compound import CompoundModel
|
||||
from nerfactory.models.instant_ngp import NGPModel
|
||||
from nerfactory.models.nerfw import NerfWModel
|
||||
from nerfactory.models.tensorf import TensoRFModel
|
||||
@@ -402,6 +403,18 @@ class InstantNGPModelConfig(ModelConfig):
|
||||
"""Number of samples in field evaluation. Defaults to 1024,"""
|
||||
|
||||
|
||||
@dataclass
|
||||
class CompoundModelConfig(ModelConfig):
|
||||
"""Compound Model Config"""
|
||||
|
||||
_target: Type = CompoundModel
|
||||
enable_density_field: bool = True
|
||||
enable_collider: bool = False
|
||||
field_implementation: Literal["torch", "tcnn"] = "tcnn" # torch, tcnn, ...
|
||||
loss_coefficients: Dict[str, float] = to_immutable_dict({"rgb_loss": 1.0})
|
||||
num_samples: int = 1024 # instead of course/fine samples
|
||||
|
||||
|
||||
@dataclass
|
||||
class NerfWModelConfig(ModelConfig):
|
||||
"""NerfW model config"""
|
||||
|
||||
@@ -20,6 +20,7 @@ from typing import Dict
|
||||
|
||||
from nerfactory.configs.base import (
|
||||
BlenderDataParserConfig,
|
||||
CompoundModelConfig,
|
||||
Config,
|
||||
FriendsDataManagerConfig,
|
||||
InstantNGPModelConfig,
|
||||
@@ -149,3 +150,22 @@ base_configs["tensorf"] = Config(
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
base_configs["compound"] = Config(
|
||||
method_name="compound",
|
||||
trainer=TrainerConfig(mixed_precision=True),
|
||||
pipeline=PipelineConfig(
|
||||
datamanager=VanillaDataManagerConfig(
|
||||
train_dataparser=BlenderDataParserConfig(),
|
||||
train_num_rays_per_batch=8192,
|
||||
eval_num_rays_per_chunk=8192,
|
||||
),
|
||||
model=CompoundModelConfig(),
|
||||
),
|
||||
optimizers={
|
||||
"fields": {
|
||||
"optimizer": OptimizerConfig(lr=3e-3, eps=1e-15),
|
||||
"scheduler": None,
|
||||
}
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user