-
Notifications
You must be signed in to change notification settings - Fork 20
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:
are involved to get the body well-aligned with the packed data.
- Use gendered SMPLX model — this solves the scale problem;
- Specify ‘flat_hand_mean’ when loading SMPLX — this makes the hand flat as in the clothed body ’scans’;
- Pelvis align: translate all the vertices of the posed body so that the pelvis locates at origin.
- Suppose you’ve loaded a ReSynth subject with
body_shape
shape parameters, and a data frame withbody_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: