Meshcapade / wiki

A Wiki on Body-Modelling Technology, maintained by Meshcapade GmbH.
https://meshcapade.wiki
94 stars 22 forks source link

SMPL 24 Joint Vertexes #7

Open bryanbocao opened 3 hours ago

bryanbocao commented 3 hours ago

Thanks for sharing this awesome wiki!

I was trying to get the indices of specific vertex indices for the 24 points: SMPL and STAR skeletons https://meshcapade.wiki/SMPL

     0: 'pelvis',
     1: 'left_hip',
     2: 'right_hip',
     3: 'spine1',
     4: 'left_knee',
     5: 'right_knee',
     6: 'spine2',
     7: 'left_ankle',
     8: 'right_ankle',
     9: 'spine3',
    10: 'left_foot',
    11: 'right_foot',
    12: 'neck',
    13: 'left_collar',
    14: 'right_collar',
    15: 'head',
    16: 'left_shoulder',
    17: 'right_shoulder',
    18: 'left_elbow',
    19: 'right_elbow',
    20: 'left_wrist',
    21: 'right_wrist',
    22: 'left_hand',
    23: 'right_hand'

However, each joint corresponds to a list of vertexes in https://meshcapade.wiki/assets/SMPL_body_segmentation/smpl/smpl_vert_segmentation.json. For instance, rightForeArm has many vertexes but I just want to find the most representive one:

"rightForeArm": [
        5015, 
        5016, 
        5017, 
        5018, 
        5019, 
        5020, 
        5021, 
        5022, 
        5023, 
        5024, 
        5025, 
        5026, 
        5027, 
        5028, 
        5029, 
        5030, 
        5031, 
...

Take another example below, if we want to mask a list of IMUs, we can find them ji_mask = torch.tensor([18, 19, 1, 2, 15, 0]) from the SMPL and STAR skeletons list above. However, their corresponding vertexes vi_mask = torch.tensor([1961, 5424, 876, 4362, 411, 3021]) are not obvious. https://github.com/FIGLAB/IMUPoser/blob/ca94eac4be156b5f16e6ed0d0953d0bac6084c1a/scripts/1.%20Preprocessing/1.%20preprocess_all.py#L32-L34

    # left wrist, right wrist, left thigh, right thigh, head, pelvis
    vi_mask = torch.tensor([1961, 5424, 876, 4362, 411, 3021])
    ji_mask = torch.tensor([18, 19, 1, 2, 15, 0])

It would be great if you can provide some better ways for that goal.

I have researched the following material but did not find the answer yet. Apologies if I missed them:

https://meshcapade.wiki/SMPL
https://github.com/Meshcapade/wiki/blob/main/assets/SMPL_body_segmentation/smpl/smpl_vert_segmentation.json
https://meshcapade.wiki/assets/SMPL_body_segmentation/smpl/smpl_vert_segmentation.json
https://files.is.tue.mpg.de/black/talks/SMPL-made-simple-FAQs.pdf

Thanks!

bryanbocao commented 2 hours ago

I am trying to inspect the 24 joints manually by visualization: https://gist.github.com/mkocabas/238faa8a24c44d60fb30ffce367f9ec7 https://github.com/bryanbocao/IMUPoser/blob/0191dccc6ad5e30f7fbf181e0514e47fb631ccd6/scripts/1_preprocessing/visualize_body_part_segmentation_sel_joint.py#L89

https://youtu.be/b1uB3lcNgzI https://youtu.be/kOCEp2V2yhc