mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Move dataset parser configs to files (#476)
* Move parser configs to files * fixed circular import errors Co-authored-by: Ethan Weber <eweb0124@gmail.com>
This commit is contained in:
1 parent
c7c4ac5a4d
commit
00c3ae73b2
9 files changed
+159
-123
No files matched your search
@@ -17,8 +17,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Type
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
@@ -31,11 +32,25 @@ from nerfactory.datamanagers.structs import DatasetInputs, SceneBounds
|
||||
from nerfactory.utils.io import get_absolute_path, load_from_json
|
||||
|
||||
|
||||
@dataclass
|
||||
class InstantNGPDataParserConfig(cfg.DataParserConfig):
|
||||
"""Instant-NGP dataset parser config"""
|
||||
|
||||
_target: Type = field(default_factory=lambda: InstantNGP)
|
||||
"""target class to instantiate"""
|
||||
data_directory: Path = Path("data/ours/posterv2")
|
||||
"""directory specifying location of data"""
|
||||
scale_factor: float = 1.0
|
||||
"""How much to scale the camera origins by."""
|
||||
scene_scale: float = 0.33
|
||||
"""How much to scale the scene. Defaults to 0.33"""
|
||||
|
||||
|
||||
@dataclass
|
||||
class InstantNGP(DataParser):
|
||||
"""Instant NGP Dataset"""
|
||||
|
||||
config: cfg.InstantNGPDataParserConfig
|
||||
config: InstantNGPDataParserConfig
|
||||
|
||||
def _generate_dataset_inputs(self, split="train"):
|
||||
|
||||
|
||||
Reference in new issue
Block a user