vye16 / slahmr

MIT License
459 stars 50 forks source link

Why is camera coordinate data passed to SMPLLoss during computing MotionLoss? #51

Open linjiangya opened 7 months ago

linjiangya commented 7 months ago

Dear authors,

In SmoothOptimizer and RootOptimizer, I think the joints3d/joints3d_op in SMPLLoss/RootLoss is in the world coordinate system. And the re-projection is performed to get the proj_2d joints from (world -> pixel coordinates).

However, it seems like in MotionLoss, the cam_pred_data is passed into RootLoss: https://github.com/vye16/slahmr/blob/58518fec991877bc4911e260776589185b828fe9/slahmr/optim/losses.py#L226-L228

Whilst I think from the logic in rollout_latent_motion(), it looks like cam_pred_data is actually still in the world coordinate system, and is transformed back from the local coordinate system used in the rollout procedure. I am therefore confused about the name of the variables: Why is this data named cam_pred_data with a comment above saying "must return trans and root orient in camera frame...", while the function name is apply_world2prior? And it doesn't look like camera coordinate system data to me.

I just would like to confirm whether this is a naming issue or I misunderstood it. Thank you!