akanazawa / hmr

Project page for End-to-end Recovery of Human Shape and Pose
Other
1.55k stars 395 forks source link

Why you ignore global rotation in SMPL? #38

Closed gsygsy96 closed 5 years ago

gsygsy96 commented 5 years ago

hello @akanazawa , When I scaned your code which is 'batch_smpl.py', I found you ignore global rotation in which adding pose blend shapes. Have you changed this part from official smpl version?

code: ` # 3. Add pose blend shapes

N x 24 x 3 x 3

        Rs = tf.reshape(
            batch_rodrigues(tf.reshape(theta, [-1, 3])), [-1, 24, 3, 3])
        with tf.name_scope("lrotmin"):
            # Ignore global rotation.
            pose_feature = tf.reshape(Rs[:, 1:, :, :] - tf.eye(3),
                                      [-1, 207])

`

akanazawa commented 5 years ago

Hi,

This is what the original SMPL does. See line 37 of posemapper.py in SMPL. This is the feature that is used to compute pose blend shapes, and pose blend shapes should be invariant to your global rotation.

FYI My TF smpl code is tested against the original SMPL to make sure that they are exactly the same :)

Best,

Angjoo