mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
* fix sdfstudio data parse without mono depth/normal paths * fix sdfstudio data parse without mono depth/normal paths
This commit is contained in:
1 parent
79b06ee2bf
commit
278f193721
1 file changed
+5
-4
@@ -87,16 +87,17 @@ class SDFStudio(DataParser):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
image_filename = self.config.data / frame["rgb_path"]
|
image_filename = self.config.data / frame["rgb_path"]
|
||||||
depth_filename = self.config.data / frame["mono_depth_path"]
|
depth_filename = frame.get("mono_depth_path")
|
||||||
normal_filename = self.config.data / frame["mono_normal_path"]
|
normal_filename = frame.get("mono_normal_path")
|
||||||
|
|
||||||
intrinsics = torch.tensor(frame["intrinsics"])
|
intrinsics = torch.tensor(frame["intrinsics"])
|
||||||
camtoworld = torch.tensor(frame["camtoworld"])
|
camtoworld = torch.tensor(frame["camtoworld"])
|
||||||
|
|
||||||
# append data
|
# append data
|
||||||
image_filenames.append(image_filename)
|
image_filenames.append(image_filename)
|
||||||
depth_filenames.append(depth_filename)
|
if depth_filename is not None and normal_filename is not None:
|
||||||
normal_filenames.append(normal_filename)
|
depth_filenames.append(self.config.data / depth_filename)
|
||||||
|
normal_filenames.append(self.config.data / normal_filename)
|
||||||
fx.append(intrinsics[0, 0])
|
fx.append(intrinsics[0, 0])
|
||||||
fy.append(intrinsics[1, 1])
|
fy.append(intrinsics[1, 1])
|
||||||
cx.append(intrinsics[0, 2])
|
cx.append(intrinsics[0, 2])
|
||||||
|
|||||||
Reference in new issue
Block a user