smplx icon indicating copy to clipboard operation
smplx copied to clipboard

SMPL to SMPL-X Conversion Broken After Latest Merges

Open jufi2112 opened this issue 1 year ago • 0 comments

Hi @vchoutas and @MarilynKeller ,

after your latest merges, the code to convert a SMPL model to a SMPL-X model does no longer work. This is because you changed the output of the SMPL-X forward pass to a namedtuple, but still access its content in transfer_model.py with square brackets: https://github.com/vchoutas/smplx/blob/4e2a3175c1309abe42b121a41f5c7d78c1935f42/transfer_model/transfer_model.py#L46 https://github.com/vchoutas/smplx/blob/4e2a3175c1309abe42b121a41f5c7d78c1935f42/transfer_model/transfer_model.py#L137 https://github.com/vchoutas/smplx/blob/4e2a3175c1309abe42b121a41f5c7d78c1935f42/transfer_model/transfer_model.py#L184

Which should be

est_vertices = body_model_output.vertices

Furthermore, this line: https://github.com/vchoutas/smplx/blob/4e2a3175c1309abe42b121a41f5c7d78c1935f42/transfer_model/transfer_model.py#L393 creates an error since it can't update a dictionary with the provided namedtuple One possibly solution would be to do:

var_dict.update(body_model_output._asdict())

Additionally, there seem to be some leftovers (from debugging?): https://github.com/vchoutas/smplx/blob/4e2a3175c1309abe42b121a41f5c7d78c1935f42/smplx/body_models.py#L128 Which I had to comment out to make the code work.

Do you want me to create a pull-request to fix these issues?

Out of curiosity: May I ask why you decided to change the output format of SMPL-X to a namedtuple, but to keep the old output format for SMPL and SMPL-H? I find it kind of strange that I now have to access the output of the three body models with different code.

Kind regards Julien

jufi2112 avatar Sep 19 '22 13:09 jufi2112