mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 12:23:46 +08:00
removed num_samples from base config (#485)
This commit is contained in:
1 parent
046b5c216b
commit
b4d344b026
2 files changed
+13
-12
No files matched your search
@@ -256,10 +256,6 @@ class ModelConfig(InstantiateConfig):
|
||||
"""parameters to instantiate scene collider with"""
|
||||
loss_coefficients: Dict[str, float] = to_immutable_dict({"rgb_loss_coarse": 1.0, "rgb_loss_fine": 1.0})
|
||||
"""Loss specific weights."""
|
||||
num_coarse_samples: int = 64
|
||||
"""Number of samples in coarse field evaluation"""
|
||||
num_importance_samples: int = 128
|
||||
"""Number of samples in fine field evaluation"""
|
||||
enable_density_field: bool = False
|
||||
"""Whether to create a density field to filter samples."""
|
||||
density_field_params: Dict[str, Any] = to_immutable_dict(
|
||||
@@ -277,12 +273,17 @@ class ModelConfig(InstantiateConfig):
|
||||
|
||||
|
||||
@dataclass
|
||||
class VanillaModelConfig(InstantiateConfig):
|
||||
class VanillaModelConfig(ModelConfig):
|
||||
"""Vanilla Model Config"""
|
||||
|
||||
num_coarse_samples: int = 64
|
||||
"""Number of samples in coarse field evaluation"""
|
||||
num_importance_samples: int = 128
|
||||
"""Number of samples in fine field evaluation"""
|
||||
|
||||
|
||||
@dataclass
|
||||
class NerfWModelConfig(ModelConfig):
|
||||
class NerfWModelConfig(VanillaModelConfig):
|
||||
"""NerfW model config"""
|
||||
|
||||
_target: Type = NerfWModel
|
||||
@@ -309,7 +310,7 @@ class NerfWModelConfig(ModelConfig):
|
||||
|
||||
|
||||
@dataclass
|
||||
class TensoRFModelConfig(ModelConfig):
|
||||
class TensoRFModelConfig(VanillaModelConfig):
|
||||
"""TensoRF model config"""
|
||||
|
||||
_target: Type = TensoRFModel
|
||||
|
||||
@@ -27,7 +27,6 @@ from nerfactory.configs.base import (
|
||||
Config,
|
||||
LoggingConfig,
|
||||
MipNerf360DataParserConfig,
|
||||
ModelConfig,
|
||||
NerfWModelConfig,
|
||||
OptimizerConfig,
|
||||
PipelineConfig,
|
||||
@@ -35,6 +34,7 @@ from nerfactory.configs.base import (
|
||||
TensoRFModelConfig,
|
||||
TrainerConfig,
|
||||
VanillaDataManagerConfig,
|
||||
VanillaModelConfig,
|
||||
ViewerConfig,
|
||||
)
|
||||
from nerfactory.datamanagers.dataparsers.friends_parser import FriendsDataParserConfig
|
||||
@@ -70,7 +70,7 @@ base_configs["mipnerf-360"] = Config(
|
||||
datamanager=VanillaDataManagerConfig(
|
||||
train_dataparser=MipNerf360DataParserConfig(), train_num_rays_per_batch=8192
|
||||
),
|
||||
model=ModelConfig(
|
||||
model=VanillaModelConfig(
|
||||
_target=MipNerf360Model,
|
||||
collider_params={"near_plane": 0.5, "far_plane": 20.0},
|
||||
loss_coefficients={"ray_loss_coarse": 1.0, "ray_loss_fine": 1.0},
|
||||
@@ -85,7 +85,7 @@ base_configs["mipnerf"] = Config(
|
||||
method_name="mipnerf",
|
||||
pipeline=PipelineConfig(
|
||||
datamanager=VanillaDataManagerConfig(train_dataparser=BlenderDataParserConfig(), train_num_rays_per_batch=8192),
|
||||
model=ModelConfig(
|
||||
model=VanillaModelConfig(
|
||||
_target=MipNerfModel,
|
||||
loss_coefficients={"rgb_loss_coarse": 0.1, "rgb_loss_fine": 1.0},
|
||||
num_coarse_samples=128,
|
||||
@@ -112,7 +112,7 @@ base_configs["semantic-nerf"] = Config(
|
||||
datamanager=VanillaDataManagerConfig(
|
||||
train_dataparser=FriendsDataParserConfig(),
|
||||
),
|
||||
model=ModelConfig(
|
||||
model=VanillaModelConfig(
|
||||
_target=SemanticNerfModel,
|
||||
loss_coefficients={"rgb_loss_coarse": 1.0, "rgb_loss_fine": 1.0, "semantic_loss_fine": 0.05},
|
||||
num_coarse_samples=64,
|
||||
@@ -127,7 +127,7 @@ base_configs["vanilla-nerf"] = Config(
|
||||
datamanager=VanillaDataManagerConfig(
|
||||
train_dataparser=BlenderDataParserConfig(),
|
||||
),
|
||||
model=ModelConfig(_target=NeRFModel),
|
||||
model=VanillaModelConfig(_target=NeRFModel),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user