Mathux / TEMOS

Official PyTorch implementation of the paper "TEMOS: Generating diverse human motions from textual descriptions", ECCV 2022 (Oral)
https://mathis.petrovich.fr/temos/
MIT License
378 stars 25 forks source link

About non-rescaled version #6

Closed dwro0121 closed 2 years ago

dwro0121 commented 2 years ago

Hello, I would like to use the non-scaled version suggested in your paper.

I'm reading the code and using it, but I wanna ask if it's right to do it the way below.

  1. in temos/model/metrics/compute.py, https://github.com/Mathux/TEMOS/blob/d9d22064882b50a6a581afa44e878b2155cc4c7c/temos/model/metrics/compute.py#L26 I changed the parameter force_in_meter to False
  2. in /temos/transforms/rots2joints/smplh.py, https://github.com/Mathux/TEMOS/blob/d9d22064882b50a6a581afa44e878b2155cc4c7c/temos/transforms/rots2joints/smplh.py#L138-L140 I removed these codes when I use smpl data

Is this the correct way to proceed non-scaled version with smpl data?

Thanks!

Mathux commented 2 years ago

Hello,

The "non-scaled version" suggested in the paper corresponds to:

1) Yes you are right about this, as by default I am doing rescaling to meter in the metrics for MMM. Without the rescaling, it is already in meters, so we need to disable this.

2) In theory you could remove this bloc of lines and it will work fine. But actually, you only need to choose jointstype=mmmns which means (mmm-non-scaled). If you look at the code, it will not do the scaling: https://github.com/Mathux/TEMOS/blob/d9d22064882b50a6a581afa44e878b2155cc4c7c/temos/transforms/rots2joints/smplh.py#L138 and it will still do the rest: https://github.com/Mathux/TEMOS/blob/d9d22064882b50a6a581afa44e878b2155cc4c7c/temos/transforms/rots2joints/smplh.py#L144

dwro0121 commented 2 years ago

Thank you for the reply.

Mathux commented 2 years ago

I saw your comment before you edited it, and in fact you are right. I updated the code accordingly to allow the usage of "mmmns" in rifke.py (so indirectly in the metric calculation). https://github.com/Mathux/TEMOS/blob/f7841a61a9d29a3ba7055ed59ecc28329b261791/temos/transforms/joints2jfeats/rifke.py#L17

There might be some mistakes like that in the code, as I did not carefully re-tested this setting during the preparation of the code release.

I may put more explanation in the README.md at some point.

Thanks for pointing this.

dwro0121 commented 2 years ago

We also need to edit the below codes.

https://github.com/Mathux/TEMOS/blob/f7841a61a9d29a3ba7055ed59ecc28329b261791/temos/transforms/joints2jfeats/tools.py#L22

https://github.com/Mathux/TEMOS/blob/f7841a61a9d29a3ba7055ed59ecc28329b261791/temos/transforms/joints2jfeats/tools.py#L30

Mathux commented 2 years ago

Yes true, I just did it thanks 👍