vchoutas / smplx

SMPL-X

Home Page:https://smpl-x.is.tue.mpg.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing translation when converting from SMPL-X to SMPL

AndresCasado opened this issue · comments

When converting from SMPL-X to SMPL, the transl parameter is set to None. This is due to the bug fixed in #148

Just opening the issue in case somebody else is trying to make this conversion and can't find the cause. Can be closed when #148 is merged

Edit: wrong PR mentioned

I still get the transl: 'None' after fixing the bug, how can this happen😭

Any fix for this? I am also suffering from this issue.

I found the reason for this. At Line, the body_model_output contains transl of None and this will overwrite var_dict to have transl of None.

Adding body_model_output.transl = var_dict['transl'] before Line will resolve this.

As I say in my initial message, the fix is in #148

The object body_model_output has transl set to None because the function that builds it forgot to set the translation. As you can see in the current code, there is no transl parameter in the output.

smplx/smplx/body_models.py

Lines 1289 to 1299 in 566532a

output = SMPLXOutput(vertices=vertices if return_verts else None,
joints=joints,
betas=betas,
expression=expression,
global_orient=global_orient,
body_pose=body_pose,
left_hand_pose=left_hand_pose,
right_hand_pose=right_hand_pose,
jaw_pose=jaw_pose,
v_shaped=v_shaped,
full_pose=full_pose if return_full_pose else None)

If you change the file smplx/body_models.py and add transl=transl, as #148 does, it should work correctly.

@AndresCasado Thanks for pointing out again! Your PR looks much better than my revision.

Closed, as #148 is merged