mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-14 11:54:01 +08:00
Config fixes
This commit is contained in:
1 parent
e5873d8dba
commit
9c061f2a99
2 files changed
+41
-23
No files matched your search
@@ -23,10 +23,25 @@ from collections import defaultdict
|
||||
from dataclasses import dataclass, field
|
||||
from functools import cached_property
|
||||
from pathlib import Path
|
||||
from typing import (Any, Callable, Dict, ForwardRef, Generic, List, Literal,
|
||||
Optional, Tuple, Type, Union, cast, get_args, get_origin)
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
ForwardRef,
|
||||
Generic,
|
||||
List,
|
||||
Literal,
|
||||
Optional,
|
||||
Tuple,
|
||||
Type,
|
||||
Union,
|
||||
cast,
|
||||
get_args,
|
||||
get_origin,
|
||||
)
|
||||
|
||||
import torch
|
||||
import tyro
|
||||
from torch import nn
|
||||
from torch.nn import Parameter
|
||||
from torch.utils.data.distributed import DistributedSampler
|
||||
@@ -38,17 +53,20 @@ from nerfstudio.cameras.rays import RayBundle
|
||||
from nerfstudio.configs.base_config import InstantiateConfig
|
||||
from nerfstudio.configs.dataparser_configs import AnnotatedDataParserUnion
|
||||
from nerfstudio.data.dataparsers.base_dataparser import DataparserOutputs
|
||||
from nerfstudio.data.dataparsers.blender_dataparser import \
|
||||
BlenderDataParserConfig
|
||||
from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig
|
||||
from nerfstudio.data.datasets.base_dataset import InputDataset
|
||||
from nerfstudio.data.pixel_samplers import (PatchPixelSamplerConfig,
|
||||
PixelSampler, PixelSamplerConfig)
|
||||
from nerfstudio.data.utils.dataloaders import (CacheDataloader,
|
||||
FixedIndicesEvalDataloader,
|
||||
RandIndicesEvalDataloader)
|
||||
from nerfstudio.data.pixel_samplers import (
|
||||
PatchPixelSamplerConfig,
|
||||
PixelSampler,
|
||||
PixelSamplerConfig,
|
||||
)
|
||||
from nerfstudio.data.utils.dataloaders import (
|
||||
CacheDataloader,
|
||||
FixedIndicesEvalDataloader,
|
||||
RandIndicesEvalDataloader,
|
||||
)
|
||||
from nerfstudio.data.utils.nerfstudio_collate import nerfstudio_collate
|
||||
from nerfstudio.engine.callbacks import (TrainingCallback,
|
||||
TrainingCallbackAttributes)
|
||||
from nerfstudio.engine.callbacks import TrainingCallback, TrainingCallbackAttributes
|
||||
from nerfstudio.model_components.ray_generators import RayGenerator
|
||||
from nerfstudio.utils.misc import IterableWrapper, get_orig_class
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
@@ -95,7 +113,7 @@ class DataManagerConfig(InstantiateConfig):
|
||||
"""Target class to instantiate."""
|
||||
data: Optional[Path] = None
|
||||
"""Source of data, may not be used by all models."""
|
||||
camera_optimizer: Optional[CameraOptimizerConfig] = None
|
||||
camera_optimizer: tyro.conf.AvoidSubcommands[Optional[CameraOptimizerConfig]] = None
|
||||
"""Specifies the camera pose optimizer used during training. Helpful if poses are noisy."""
|
||||
masks_on_gpu: bool = False
|
||||
"""Process masks on GPU for speed at the expense of memory, if True."""
|
||||
|
||||
@@ -60,17 +60,17 @@ from nerfstudio.utils import poses as pose_utils
|
||||
class GaussianSplattingModelConfig(ModelConfig):
|
||||
"""Gaussian Splatting Model Config"""
|
||||
_target: Type = field(default_factory=lambda: GaussianSplattingModel)
|
||||
initial_ptc_size = 100000
|
||||
max_ptc_size = 100000
|
||||
render_accumulation = False
|
||||
use_aabb = True
|
||||
initial_gaussian_scales = -3
|
||||
prune_density_after = 500
|
||||
prune_density_every = 100
|
||||
prune_density_until = 15000
|
||||
one_up_sh_every = 1000
|
||||
lambda_ssim = 0.2
|
||||
use_diff_rast = False # TODO (jake-austin): remove
|
||||
initial_ptc_size: int = 100000
|
||||
max_ptc_size: int = 100000
|
||||
render_accumulation: bool = False
|
||||
use_aabb: bool = True
|
||||
initial_gaussian_scales: int = -3
|
||||
prune_density_after: int = 500
|
||||
prune_density_every: int = 100
|
||||
prune_density_until: int = 15000
|
||||
one_up_sh_every: int = 1000
|
||||
lambda_ssim: float = 0.2
|
||||
use_diff_rast: bool = False # TODO (jake-austin): remove
|
||||
|
||||
class GaussianSplattingModel(Model):
|
||||
"""Gaussian Splatting model
|
||||
|
||||
Reference in new issue
Block a user