#1732 fix sdf dataparser no mono paths (#1910)

* fix sdfstudio data parse without mono depth/normal paths

* fix sdfstudio data parse without mono depth/normal paths
This commit is contained in:
Milan van Wouden authored and GitHub committed 2023-05-11 16:52:28 -07:00
1 parent 79b06ee2bf
commit 278f193721
1 file changed
+5 -4
@@ -87,16 +87,17 @@ class SDFStudio(DataParser):
continue
image_filename = self.config.data / frame["rgb_path"]
depth_filename = self.config.data / frame["mono_depth_path"]
normal_filename = self.config.data / frame["mono_normal_path"]
depth_filename = frame.get("mono_depth_path")
normal_filename = frame.get("mono_normal_path")
intrinsics = torch.tensor(frame["intrinsics"])
camtoworld = torch.tensor(frame["camtoworld"])
# append data
image_filenames.append(image_filename)
depth_filenames.append(depth_filename)
normal_filenames.append(normal_filename)
if depth_filename is not None and normal_filename is not None:
depth_filenames.append(self.config.data / depth_filename)
normal_filenames.append(self.config.data / normal_filename)
fx.append(intrinsics[0, 0])
fy.append(intrinsics[1, 1])
cx.append(intrinsics[0, 2])