mks0601 / I2L-MeshNet_RELEASE

Official PyTorch implementation of "I2L-MeshNet: Image-to-Lixel Prediction Network for Accurate 3D Human Pose and Mesh Estimation from a Single RGB Image", ECCV 2020
MIT License
710 stars 130 forks source link

Param regressor for MANO #33

Closed pablovela5620 closed 3 years ago

pablovela5620 commented 3 years ago

I had a question regarding the following ParamRegressor part of the code.

First, why are you concatenating a zero tensor of shape (batch, 3, 1) to the 2nd axis? I see that you're converting from rotation matrix to angle axis, and you're using torch geometry (which is kornia now I think?). Is this just to convert the rotation matrix to a transformation matrix with 0 translation to be compatible with torch geometry?

        pose = torch.cat([pose,torch.zeros((pose.shape[0],3,1)).cuda().float()],2)
        pose = tgm.rotation_matrix_to_angle_axis(pose).reshape(-1,72)

It also looks like the reshape to 72 only works for SMPL estimation and it should be 48 (16*3) for mano?

mks0601 commented 3 years ago

rotation_matrix_to_angle_axis requires 3x4 rotation matrix.

mks0601 commented 3 years ago

https://kornia.readthedocs.io/en/v0.1.2/conversions.html#torchgeometry.rotation_matrix_to_angle_axis

pablovela5620 commented 3 years ago

I see, I was using a newer version of kornia that changed that to a 3x3 so that was my confusion https://kornia.readthedocs.io/en/latest/geometry.conversions.html?highlight=rotation#kornia.geometry.conversions.angle_axis_to_rotation_matrix