dataset/view bugfix

This commit is contained in:
2023-01-14 18:42:27 +00:00
parent 581a5b2af2
commit 7dffb02286
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -69,6 +69,7 @@ class Dataset(Dataset):
# body = readPC2Frame(os.path.join(path, 'Body_posed.pc16'), frame.frame_nr, True)
body, body_faces, root_joint, joints, joints_no_trans = self.reader.read_human(frame.id, frame.frame_nr, trans, zrot)
# body_no_trans, _, _, _, _ = self.reader.read_human(frame.id, frame.frame_nr, absolute=False)
body = torch.tensor(body.astype(np.float32), device=self.device)
body_faces = quads2tris(body_faces)
if self.random_view:
@@ -81,9 +82,9 @@ class Dataset(Dataset):
mesh_posed = transform.transform_points(mesh_posed)
body = transform.transform_points(body)
else:
view = torch.eye(3)
view = torch.eye(3, device=self.device)
combined = torch.Tensor(np.concatenate((body, mesh_posed[mesh_mask, :]))).to(self.device)
combined = torch.concat((body, mesh_posed[mesh_mask, :]))
# combined_no_trans = torch.Tensor(np.concatenate((body_no_trans, mesh_posed_no_trans[mesh_mask, :]))).to('cuda')
combined_faces = torch.Tensor(np.concatenate((body_faces, faces + body.shape[0]))).to(self.device)