Update dataparser docs (#1698)

* Update dataparser docs

* Add missing files
This commit is contained in:
Matthew Tancik authored and GitHub committed 2023-04-04 18:30:52 -07:00
1 parent 7126334976
commit 2e777e4577
13 files changed
+263 -97

No files matched your search

@@ -149,10 +149,11 @@ class DataManager(nn.Module):
Usage:
To get data, use the next_train and next_eval functions.
This data manager's next_train and next_eval methods will return 2 things:
1. A Raybundle: This will contain the rays we are sampling, with latents and
conditionals attached (everything needed at inference)
2. A "batch" of auxiliary information: This will contain the mask, the ground truth
pixels, etc needed to actually train, score, etc the model
1. A Raybundle: This will contain the rays we are sampling, with latents and
conditionals attached (everything needed at inference)
2. A "batch" of auxiliary information: This will contain the mask, the ground truth
pixels, etc needed to actually train, score, etc the model
Rationale:
Because of this abstraction we've added, we can support more NeRF paradigms beyond the
@@ -42,7 +42,7 @@ from nerfstudio.data.scene_box import SceneBox
CONSOLE = Console(width=120)
def find_files(directory: str, exts: List[str]):
def _find_files(directory: str, exts: List[str]):
"""Find all files in a directory that have a certain file extension.
Args:
@@ -94,8 +94,8 @@ def get_camera_params(
split_dir = f"{scene_dir}/{split}"
# camera parameters files
intrinsics_files = find_files(f"{split_dir}/intrinsics", exts=["*.txt"])
pose_files = find_files(f"{split_dir}/pose", exts=["*.txt"])
intrinsics_files = _find_files(f"{split_dir}/intrinsics", exts=["*.txt"])
pose_files = _find_files(f"{split_dir}/pose", exts=["*.txt"])
num_cams = len(pose_files)
@@ -219,12 +219,12 @@ class NeRFOSR(DataParser):
)
# --- images ---
image_filenames = find_files(f"{split_dir}/rgb", exts=["*.png", "*.jpg", "*.JPG", "*.PNG"])
image_filenames = _find_files(f"{split_dir}/rgb", exts=["*.png", "*.jpg", "*.JPG", "*.PNG"])
# --- masks ---
mask_filenames = []
if self.config.use_masks:
mask_filenames = find_files(f"{split_dir}/mask", exts=["*.png", "*.jpg", "*.JPG", "*.PNG"])
mask_filenames = _find_files(f"{split_dir}/mask", exts=["*.png", "*.jpg", "*.JPG", "*.PNG"])
dataparser_outputs = DataparserOutputs(
image_filenames=image_filenames,
@@ -39,10 +39,14 @@ class ScanNetDataParserConfig(DataParserConfig):
ScanNet dataset (https://www.scan-net.org/) is a large-scale 3D dataset of indoor scenes.
This dataparser assumes that the dense stream was extracted from .sens files.
Expected structure of scene directory:
- color/
- depth/
- intrinsic/
- pose/
.. code-block:: text
root/
├── color/
├── depth/
├── intrinsic/
├── pose/
"""
_target: Type = field(default_factory=lambda: ScanNet)