mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 14:58:55 +08:00
remove root dir logic from hydra (#587)
This commit is contained in:
1 parent
c871ff7e13
commit
5d26f3d5c4
7 files changed
+20
-85
No files matched your search
@@ -28,7 +28,7 @@ from nerfactory.cameras import utils as camera_utils
|
||||
from nerfactory.cameras.cameras import CAMERA_MODEL_TO_TYPE, Cameras, CameraType
|
||||
from nerfactory.datamanagers.dataparsers.base import DataParser, DataParserConfig
|
||||
from nerfactory.datamanagers.structs import DatasetInputs, SceneBounds
|
||||
from nerfactory.utils.io import get_absolute_path, load_from_json
|
||||
from nerfactory.utils.io import load_from_json
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -60,9 +60,8 @@ class Nerfactory(DataParser):
|
||||
|
||||
def _generate_dataset_inputs(self, split="train"):
|
||||
# pylint: disable=too-many-statements
|
||||
abs_dir = get_absolute_path(self.config.data_directory)
|
||||
|
||||
meta = load_from_json(abs_dir / "transforms.json")
|
||||
meta = load_from_json(self.config.data_directory / "transforms.json")
|
||||
image_filenames = []
|
||||
poses = []
|
||||
num_skipped_image_filenames = 0
|
||||
@@ -72,9 +71,9 @@ class Nerfactory(DataParser):
|
||||
else:
|
||||
filepath = Path(frame["file_path"])
|
||||
if self.config.downscale_factor > 1:
|
||||
fname = abs_dir / f"images_{self.config.downscale_factor}" / filepath.name
|
||||
fname = self.config.data_directory / f"images_{self.config.downscale_factor}" / filepath.name
|
||||
else:
|
||||
fname = abs_dir / filepath
|
||||
fname = self.config.data_directory / filepath
|
||||
if not fname:
|
||||
num_skipped_image_filenames += 1
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user