mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 14:58:55 +08:00
delete sample_config.py + small fixes
This commit is contained in:
1 parent
7130b34790
commit
ad15e0bb42
3 files changed
+3
-34
No files matched your search
@@ -22,6 +22,7 @@ from collections import OrderedDict
|
|||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
import tyro
|
import tyro
|
||||||
|
from nerfstudio.data.pixel_samplers import PairPixelSamplerConfig
|
||||||
|
|
||||||
from nerfstudio.cameras.camera_optimizers import CameraOptimizerConfig
|
from nerfstudio.cameras.camera_optimizers import CameraOptimizerConfig
|
||||||
from nerfstudio.configs.base_config import ViewerConfig
|
from nerfstudio.configs.base_config import ViewerConfig
|
||||||
@@ -171,6 +172,7 @@ method_configs["depth-nerfacto"] = TrainerConfig(
|
|||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
datamanager=VanillaDataManagerConfig(
|
datamanager=VanillaDataManagerConfig(
|
||||||
_target=VanillaDataManager[DepthDataset],
|
_target=VanillaDataManager[DepthDataset],
|
||||||
|
sampling_config=PairPixelSamplerConfig(),
|
||||||
dataparser=NerfstudioDataParserConfig(),
|
dataparser=NerfstudioDataParserConfig(),
|
||||||
train_num_rays_per_batch=4096,
|
train_num_rays_per_batch=4096,
|
||||||
eval_num_rays_per_batch=4096,
|
eval_num_rays_per_batch=4096,
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. All rights reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
"""Config used for sampling rays."""
|
|
||||||
|
|
||||||
from dataclasses import dataclass
|
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
from nerfstudio.configs.base_config import (
|
|
||||||
InstantiateConfig,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class SamplingConfig(InstantiateConfig):
|
|
||||||
"""Full config contents for defining a pixel sampler."""
|
|
||||||
|
|
||||||
patch_size: int = 1
|
|
||||||
"""Patch size for sampling rays."""
|
|
||||||
method_name: Optional[str] = None
|
|
||||||
"""Method name. Required to set in python or via cli"""
|
|
||||||
@@ -54,7 +54,6 @@ from nerfstudio.data.datasets.base_dataset import InputDataset
|
|||||||
from nerfstudio.data.pixel_samplers import (
|
from nerfstudio.data.pixel_samplers import (
|
||||||
PixelSampler,
|
PixelSampler,
|
||||||
PixelSamplerConfig,
|
PixelSamplerConfig,
|
||||||
PairPixelSamplerConfig,
|
|
||||||
)
|
)
|
||||||
from nerfstudio.data.utils.dataloaders import (
|
from nerfstudio.data.utils.dataloaders import (
|
||||||
CacheDataloader,
|
CacheDataloader,
|
||||||
@@ -338,7 +337,7 @@ class VanillaDataManagerConfig(DataManagerConfig):
|
|||||||
"""The scale factor for scaling spatial data such as images, mask, semantics
|
"""The scale factor for scaling spatial data such as images, mask, semantics
|
||||||
along with relevant information about camera intrinsics
|
along with relevant information about camera intrinsics
|
||||||
"""
|
"""
|
||||||
sampling_config: PixelSamplerConfig = PairPixelSamplerConfig()
|
sampling_config: PixelSamplerConfig = PixelSamplerConfig()
|
||||||
"""Specifies the pixel sampler used to sample pixels from images."""
|
"""Specifies the pixel sampler used to sample pixels from images."""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user