add view to input

This commit is contained in:
2023-01-10 14:02:11 +00:00
parent 337ff40c89
commit c7ba2f1b54
3 changed files with 31 additions and 7 deletions
+3
View File
@@ -192,6 +192,8 @@ class Dataset(Dataset):
rgb_image = tv.io.read_image(os.path.join(self.folder_rgb, frame.id, f'{frame.frame_nr:04d}.png'), mode=tv.io.ImageReadMode.RGB).to(self.device).to(torch.float32)
view = torch.tensor(np.concatenate((np.array([info['zrot']], dtype=np.float32), info['camLoc'].astype(np.float32), info['trans'][:,frame.frame_nr].astype(np.float32)), axis=0), device=self.device)
# image = self.transforms(image)
data = { 'mesh_posed': mesh_posed,
'depth_image': depth_image,
@@ -201,6 +203,7 @@ class Dataset(Dataset):
'depth_mask_garment': depth_mask_garment,
'depth_mask_body': depth_mask_body,
'rgb_image': rgb_image,
'view': view,
}
self.cache[frame] = data