mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 06:49:13 +08:00
Colmap type of dataset (from "friends" project) (#56)
* code to process the friends data. need to add masking * code to process the friends data. need to add masking * black * trying to fix black * black fixed * updating black version
This commit is contained in:
1 parent
770c885f05
commit
0b82c1188c
21 files changed
+784
-101
No files matched your search
@@ -0,0 +1,42 @@
|
||||
"""
|
||||
Dataset input structures.
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Optional
|
||||
|
||||
import torch
|
||||
from torchtyping import TensorType
|
||||
|
||||
|
||||
@dataclass
|
||||
class PointCloud:
|
||||
"""_summary_"""
|
||||
|
||||
xyz: None
|
||||
rgb: None
|
||||
|
||||
|
||||
@dataclass
|
||||
class DatasetInputs:
|
||||
"""Dataset inputs for the image dataset and the ray generator.
|
||||
|
||||
Args:
|
||||
image_filenames: Filenames for the images.
|
||||
...
|
||||
"""
|
||||
|
||||
image_filenames: List[str]
|
||||
downscale_factor: int = 1
|
||||
intrinsics: torch.tensor = None
|
||||
camera_to_world: torch.tensor = None
|
||||
bounding_box: torch.tensor = None
|
||||
depth_filenames: List[str] = None
|
||||
semantic_filenames: List[str] = None
|
||||
point_cloud: PointCloud = None # TODO(ethan): specify the type here
|
||||
alpha_color: Optional[TensorType[3]] = None
|
||||
|
||||
def check_inputs(self):
|
||||
"""Check the inputs to make sure everything is okay."""
|
||||
assert self.intrinsics.dtype == torch.float32
|
||||
assert self.camera_to_world.dtype == torch.float32
|
||||
Reference in new issue
Block a user