ytrock / THuman2.0-Dataset

304 stars 10 forks source link

misalignment between scans and SMPL-X fits #8

Closed YuliangXiu closed 2 years ago

YuliangXiu commented 2 years ago

Really thanks for your released SMPL-X fits!

I tried to render the scans and SMPL-X fits within the same space with the same scale but failed

Could you share some hints for scan-fit alignment, such as:

  1. SMPL-X neutral or SMPL-X male/female?
  2. How to deal with the changing scale of original scans? (Fig.1)
  3. The root rotation of SMPL-X seems different from the original scans
  4. verts scale + trans or (verts + trans)scale?

Or, would you mind sharing the visualization code for Fig.2?

Many thanks

Attachment

D12E0ACA-8D43-4F44-9230-20F9072CED72

ytrock commented 2 years ago

Hi Liang,

Please first scale the generated SMPL-X model using the provided additional 'scale' parameter, and then apply global transformation using the 'trans' parameters of the SMPL-X model.

YuliangXiu commented 2 years ago

Hi Dr.Yu

Along Y-axis, I calculated the scan scale and SMPL-X scale of 0000 and 0001

id scan scale(ymax-ymin) smpl-x scale(param['scale']) scan/smpl-x
0000 0.9996575 0.4335 2.3060149942
0001 0.57851567 0.4508 1.2833089397

the scan/smpl-x relative scales are different, shouldn't this be the same?

0000 350 350 2
0001 350 3 350 4

Also the root rotation seems wrong for 0001

Here are my code to load param.pkl

import smplx
get_smpl_model = lambda smpl_type, smpl_gender : smplx.create(
            model_path=SMPLX().model_dir,
            gender=smpl_gender,
            model_type=smpl_type,
            use_pca=True,
            num_pca_comps=12,
            ext='npz')

smpl_model = get_smpl_model('smplx', 'neutral')

smpl_out = smpl_model(shape_params=param['betas'],
                            expression_params=param['expression'],
                            body_pose=param['body_pose'],
                            global_pose=param['global_orient'],
                            jaw_pose=param['jaw_pose'],
                            left_hand_pose=param['left_hand_pose'],
                            right_hand_pose=param['right_hand_pose'],
                            leye_pose=param['leye_pose'],
                            reye_pose=param['reye_pose'])

smpl_verts = smpl_out.vertices[0] * param['scale'] + param['translation']

The whole rendering scripts are in icon-dataset-preprocess

Thanks for your help in advance.

ytrock commented 2 years ago

Hi Yuliang,

We will update the SMPL-X parameters with the correct scale and trans ASAP. Sorry for the inconvenience.

ytrock commented 2 years ago

We have fixed the SMPL-X parameters. Note again: please first-scale-and-then-translate the generated SMPL-X model for generating the mesh.