fix smpl trans handling

This commit is contained in:
2023-01-16 16:37:11 +00:00
parent 7dffb02286
commit 4dee8e4106
+2 -2
View File
@@ -57,11 +57,11 @@ class DataReader:
- V: human mesh vertices - V: human mesh vertices
- F: mesh faces - F: mesh faces
""" """
def read_human(self, sample, frame, trans, zrot): def read_human(self, sample, frame, zrot, use_trans=True):
# SMPL parameters # SMPL parameters
gender, pose, shape, trans = self.read_smpl_params(sample, frame) gender, pose, shape, trans = self.read_smpl_params(sample, frame)
# Compute SMPL # Compute SMPL
V, J = self.smpl[gender].set_params(pose=pose, beta=shape, trans=trans) V, J = self.smpl[gender].set_params(pose=pose, beta=shape, trans=trans if use_trans else None)
V -= J[0:1] V -= J[0:1]
# Apply rotation on z-axis # Apply rotation on z-axis
zRot = zRotMatrix(zrot) zRot = zRotMatrix(zrot)