mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 06:49:13 +08:00
nerf-w and semantic-nerf initial implementations (#73)
* initial nerfw code * nerfw should be implmented correctly now * semantic nerf in progress. data loader is too slow and not clean right now * added implementation of semantic nerf * mend
This commit is contained in:
1 parent
97c9fe2541
commit
1c1a58c4e5
22 files changed
+725
-92
No files matched your search
@@ -13,8 +13,18 @@ from torchtyping import TensorType
|
||||
class PointCloud:
|
||||
"""_summary_"""
|
||||
|
||||
xyz: None
|
||||
rgb: None
|
||||
xyz = None
|
||||
rgb = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class Semantics:
|
||||
"""_summary_"""
|
||||
|
||||
stuff_classes: List[str] = None
|
||||
stuff_filenames: List[str] = None
|
||||
thing_classes: List[str] = None
|
||||
thing_filenames: List[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -31,12 +41,21 @@ class DatasetInputs:
|
||||
intrinsics: torch.tensor = None
|
||||
camera_to_world: torch.tensor = None
|
||||
bounding_box: torch.tensor = None
|
||||
mask_filenames: List[str] = None
|
||||
depth_filenames: List[str] = None
|
||||
semantic_filenames: List[str] = None
|
||||
point_cloud: PointCloud = None # TODO(ethan): specify the type here
|
||||
semantics: Semantics = Semantics()
|
||||
point_cloud: PointCloud = PointCloud()
|
||||
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
|
||||
|
||||
def save_to_folder_name(self, data_directory: str):
|
||||
"""Save the dataset inputs."""
|
||||
raise NotImplementedError
|
||||
|
||||
def load_from_folder_name(self, data_directory: str):
|
||||
"""Load the saved dataset inputs."""
|
||||
raise NotImplementedError
|
||||
Reference in new issue
Block a user