Llff & blender convention fix

Summary: Images were coming out in the wrong format.

Reviewed By: shapovalov

Differential Revision: D37291278

fbshipit-source-id: c10871c37dd186982e7abf2071ac66ed583df2e6
This commit is contained in:
Jeremy Reizenstein
2022-06-22 05:54:54 -07:00
committed by Facebook GitHub Bot
parent 2e42ef793f
commit 731ea53c80
3 changed files with 4 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ class BlenderDatasetMapProvider(SingleSceneDatasetMapProviderBase):
)
H, W, focal = hwf
H, W = int(H), int(W)
images = torch.from_numpy(images)
images = torch.from_numpy(images).permute(0, 3, 1, 2)[:, :3]
# pyre-ignore[16]
self.poses = _interpret_blender_cameras(poses, H, W, focal)

View File

@@ -50,7 +50,7 @@ class LlffDatasetMapProvider(SingleSceneDatasetMapProviderBase):
i_split = (i_train, i_test, i_test)
H, W, focal = hwf
H, W = int(H), int(W)
images = torch.from_numpy(images)
images = torch.from_numpy(images).permute(0, 3, 1, 2)
poses = torch.from_numpy(poses)
# pyre-ignore[16]