mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-25 10:29:51 +08:00
1 parent
61c8c5b665
commit
5a76b955cd
12 files changed
+40
-31
No files matched your search
@@ -41,8 +41,8 @@ class NerfstudioDataParserConfig(DataParserConfig):
|
||||
|
||||
_target: Type = field(default_factory=lambda: Nerfstudio)
|
||||
"""target class to instantiate"""
|
||||
data_directory: Path = Path("data/nerfstudio/poster")
|
||||
"""directory specifying location of data"""
|
||||
data: Path = Path("data/nerfstudio/poster")
|
||||
"""Directory specifying location of data."""
|
||||
scale_factor: float = 1.0
|
||||
"""How much to scale the camera origins by."""
|
||||
downscale_factor: int = 1
|
||||
@@ -65,7 +65,7 @@ class Nerfstudio(DataParser):
|
||||
def _generate_dataparser_outputs(self, split="train"):
|
||||
# pylint: disable=too-many-statements
|
||||
|
||||
meta = load_from_json(self.config.data_directory / "transforms.json")
|
||||
meta = load_from_json(self.config.data / "transforms.json")
|
||||
image_filenames = []
|
||||
poses = []
|
||||
num_skipped_image_filenames = 0
|
||||
@@ -75,9 +75,9 @@ class Nerfstudio(DataParser):
|
||||
else:
|
||||
filepath = Path(frame["file_path"])
|
||||
if self.config.downscale_factor > 1:
|
||||
fname = self.config.data_directory / f"images_{self.config.downscale_factor}" / filepath.name
|
||||
fname = self.config.data / f"images_{self.config.downscale_factor}" / filepath.name
|
||||
else:
|
||||
fname = self.config.data_directory / filepath
|
||||
fname = self.config.data / filepath
|
||||
if not fname:
|
||||
num_skipped_image_filenames += 1
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user