Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing keypoint recovery after convention #371

Open
Dipankar1997161 opened this issue Aug 7, 2023 · 6 comments
Open

Missing keypoint recovery after convention #371

Dipankar1997161 opened this issue Aug 7, 2023 · 6 comments

Comments

@Dipankar1997161
Copy link

Hello @Wei-Chen-hub,

I used the keypoint convention for smpl to coco.
There are certain missing joints after conversion, particularly the face keypoints.

Is it possible to recover "nose" keypoint after the conversion? That's the most important one for me.
here is the example result
Screenshot_20230807_155137

I will wait for your response

@Wei-Chen-hub
Copy link
Collaborator

This is because SMPL only have limited joints for face and hand, you can see SMPL keypoints here

Nose is not included in smpl joint set (which only have 24 joints), convert_kps only converts keypoints with similiar definitions.

Considering the source of joints annotations, I suggest two ways:

  • Regress full smpl joints, which supports nose (smpl_45 instead of smpl)
  • Manually interpolate the nose keypoints, perhaps from head and neck, if original smpl parameters are not accessible

@Dipankar1997161
Copy link
Author

Hello @Wei-Chen-hub,
Thanks for the clarification.

The smpl data I have generated has 24 joints, which is the standard used.
For the first method, is the full smpl regression possible through mmhuman3d? if yes, can you refer it to me.

I was thinking of the second method, but couldn't really find a proper source to read and try it out. I did try one directly with coco, but it turned out incorrectly.
258787912-234b4d6e-2a84-46c4-a5d2-f15562a49748 258787918-c3a091fc-95b3-4a2c-82e9-a42adce5483b

Looking forward to hear from you

@Wei-Chen-hub
Copy link
Collaborator

For joints regression from SMPL parameters, you can see the official SMPL/SMPLX repo.

Alternatively, in MMHuman3D you can do this through several steps:

  • Prepare body model as here
  • Build body model (in your code)
from mmhuman3d.models.body_models.builder import build_body_model

smpl_model = build_body_model(dict(
    type='SMPL',
    keypoint_src='smpl_45',
    keypoint_dst='smpl_45',
    model_path='data/body_models/smpl', # modify this path to your SMPL model folder
    gender='neutral',
    num_betas=10,
    use_pca=False,
    batch_size=1)).to(self.device)

  • Input parameters and get 3d joints
output = smpl_model(parameters_dict, return_joints=True) # smpl parameters
keypoints_3d = output['joints'].detach().cpu().numpy()

The input parameters are basically same as the official inplementation.

@ypilseong
Copy link

The data I need is a mediapipe key point. Could you tell me how to do a convention with a mediapipe keypoint?

@ypilseong
Copy link

@Wei-Chen-hub
Is it right to write the build_body_model in estimate_smpl.py?

@ypilseong
Copy link

@Dipankar1997161
Can I know how to convert keypoints to mediapipes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants