youngwoo-yoon / Co-Speech_Gesture_Generation

This is an implementation of Robots learn social skills: End-to-end learning of co-speech gesture generation for humanoid robots.
https://sites.google.com/view/youngwoo-yoon/projects/co-speech-gesture-generation
Other
71 stars 9 forks source link

pymo 'to position' for Trinity #13

Closed YoungSeng closed 2 years ago

YoungSeng commented 2 years ago

Hello, for Trinity dataset, in GENEA challenge 2020, is the _to_pos function in its preprocessing.py in pymo not working, because I can't get it to work successfully using ('param', MocapParameterizer('position')) in the pipeline.

How can this be solved? Thanks!

youngwoo-yoon commented 2 years ago

Hello, please try GENEA_2020 tagged version (https://github.com/youngwoo-yoon/Co-Speech_Gesture_Generation/tree/GENEA_2020) if you're currently using the latest version. PyMo has dependencies on the joint configuration, so the code is slightly modified for the GENEA 2022 dataset.

YoungSeng commented 2 years ago

Yes, I was using this branch and was strange not to work.

TeoNikolov commented 2 years ago

I am linking information from this comment https://github.com/genea-workshop/Speech_driven_gesture_generation_with_autoencoder/issues/2#issuecomment-1229198521

Okay, thank you, I uploaded my code here. For the TestSeq001.bvh file in the GENEA validation set, there are 71 joints in the whole body, minus 14 joints with Nub, leaving 57 joints, the coordinates of its position should be 171, but only 162 after conversion, what should I do?


Note that I cannot help much with this issue right now, as I have not used the GENEA 2020 dataset, and it would take me a while to get things running to try and reproduce the issue on my computer.

youngwoo-yoon commented 2 years ago

Hello, Sorry for the late reply. I just ran your test script and I found that it gives 171 values, which is the expected number, if you do not use ConstantsRemover at line 51 in bvh_to_position.py.

YoungSeng commented 2 years ago

Thank you for your reply, I'll try again, thank you so much.

YoungSeng commented 2 years ago

I commented out the line and it was 225 instead of 171, which is strange. @youngwoo-yoon

youngwoo-yoon commented 2 years ago

I used the code and bvh file in https://github.com/YoungSeng/Pymo-Issue. And I got the output numpy matrix in (2577, 171) shape. The processing pipeline is as follows.

    data_pipe = Pipeline([
        ('dwnsampl', DownSampler(tgt_fps=20, keep_all=False)),
        ('root', RootTransformer('hip_centric')),
        ('param', MocapParameterizer('position')),        # expmap, position
        ('np', Numpyfier())
    ])
YoungSeng commented 2 years ago

Thanks for the answer, but strangely enough that's what I did, but couldn't get the correct result.

In any case, I got 171 with another approach, which was to set at the beginning:

target_joints = ['Hips', 'LeftUpLeg', 'LeftLeg', 'LeftFoot', 'LeftForeFoot', 'LeftToeBase', 'RightUpLeg', 'RightLeg', 'RightFoot', 'RightForeFoot', 'RightToeBase', 'Spine', 'Spine1', 'Spine2', 'Spine3', 'pCube4', 'LeftShoulder', 'LeftArm', 'LeftForeArm', 'LeftHand', 'LeftHandPinky1', 'LeftHandPinky2', 'LeftHandPinky3', 'LeftHandRing1', 'LeftHandRing2', 'LeftHandRing3', 'LeftHandMiddle1', 'LeftHandMiddle2', 'LeftHandMiddle3', 'LeftHandIndex1', 'LeftHandIndex2', 'LeftHandIndex3', 'LeftHandThumb1', 'LeftHandThumb2', 'LeftHandThumb3', 'RightShoulder', 'RightArm', 'RightForeArm', 'RightHand', 'RightHandPinky1', 'RightHandPinky2', 'RightHandPinky3', 'RightHandRing1', 'RightHandRing2', 'RightHandRing3', 'RightHandMiddle1', 'RightHandMiddle2', 'RightHandMiddle3', 'RightHandIndex1', 'RightHandIndex2', 'RightHandIndex3', 'RightHandThumb1', 'RightHandThumb2', 'RightHandThumb3', 'Neck', 'Neck1', 'Head']

Then the pipeline is:

    data_pipe = Pipeline([
        ('dwnsampl', DownSampler(tgt_fps=60, keep_all=False)),
        ('root', RootTransformer('hip_centric')),
        ('jtsel', JointSelector(target_joints, include_root=False)),     # (225) -> 171
        ('pos', MocapParameterizer('position')),
        ('np', Numpyfier())
    ])

Anyway the problem can be solved, thank you!