Skip to content

How to align the SMPL‐X body with the clothed body point clouds in ReSynth data

Qianli Ma edited this page Dec 6, 2023 · 1 revision

In ReSynth dataset, we provide the SMPL-X body pose and shape parameters of the simulated bodies. If simply applying them to the SMPL-X model, the output body mesh will have a wrong scale and offset from the clothed body in the packed data. Something like this:

image

3 Steps

are involved to get the body well-aligned with the packed data.

  1. Use gendered SMPLX model — this solves the scale problem;
  2. Specify ‘flat_hand_mean’ when loading SMPLX — this makes the hand flat as in the clothed body ’scans’;
  3. Pelvis align: translate all the vertices of the posed body so that the pelvis locates at origin.

Concretely

  • Suppose you’ve loaded a ReSynth subject with body_shape shape parameters, and a data frame with body_pose pose parameter.
  • Instantiate gendered SMPLX model with flat_hand_mean arg
model = smplx.create(model_path=<your_smplx_path>, model_type="smplx", flat_hand_mean=True, gender="male")
  • Forward pass of SMPLX, get the vertices and joints:
out = model(betas=torch.tensor(betas[None]), body_pose=torch.tensor(body_pose[None]))
  • subtract vertices by the position of the root joint:
pelvis = out.joints[0:1,0:1][None]
verts = out.vertices - pelvis.unsqueeze(1)
  • Then compare these vertices with the scan_pc in the packed data frame.

You should get a well-aligned results, something like the image below:

image