vchoutas / smplx

SMPL-X
https://smpl-x.is.tue.mpg.de/
Other
1.73k stars 301 forks source link

Missing translation when converting from SMPL-X to SMPL #168

Closed AndresCasado closed 9 months ago

AndresCasado commented 1 year ago

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

Orange-Ctrl commented 10 months ago

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

MinJunKang commented 10 months ago

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

MinJunKang commented 10 months ago

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.

AndresCasado commented 10 months ago

As I say in my initial message, the fix is in https://github.com/vchoutas/smplx/pull/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.

https://github.com/vchoutas/smplx/blob/566532a4636d9336403073884dbdd9722833d425/smplx/body_models.py#L1289-L1299

If you change the file smplx/body_models.py and add transl=transl, as https://github.com/vchoutas/smplx/pull/148 does, it should work correctly.

MinJunKang commented 10 months ago

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

AndresCasado commented 9 months ago

Closed, as https://github.com/vchoutas/smplx/pull/148 is merged