Motion to Text generation results are messy code
Hi there,
I'm trying to inference the model on Motion to Text task following MotionGPT input format like this:
Explain the motion illustrated in
But the output text is messy code: 0 --------------- _______ ~~~~ ~~~~~~~~~~ �� _____ ________ ________________ ____ ________________________ <|endoftext|> 1 ��� �� <|endoftext|>
Same
I have resolved the issue, you need to use the forward function in motion2text.
I have resolved the issue, you need to use the forward function in motion2text.
@haoyuhsu could you please show the details? DO you mean this forward fuction? https://github.com/OpenMotionLab/MotionGPT3/blob/32e049bcc93e24c14ad72ac43313ac77b91d76c7/motGPT/models/motgpt.py#L93
@Zhengyu-Li
Within the motGPT/archs/motgpt_l2lm.py, you need to execute in this order: motion_feats_to_tokens --> template_fulfill --> generate_direct. I was missing the template_fulfill part at that time and got the same buggy output as yours. Hope it helps!
Sorry for the long wait. I’m not sure if you’ve already resolved this.
We realized that we forgot to provide the proper demo for this task. Now the example files for both T2M and M2T inputs has been uploaded to the demos/ directory.
For instance, the input is expected to be in the following format:
Explain the motion illustrated in <Motion_Placeholder> using language. #M000307.npy
Describe the action being represented by <Motion_Placeholder> using text.#009877.npy
Then demo.py will replace <Motion_Placeholder> with the actual input placeholders for generation, just as @haoyuhsu mentioned.
Thank you. I've solved the issue.
In your code, you use generate_direct for 'm2t' task. But this function doesn't have template_fulfill part as @haoyuhsu mentioned. So I use generate_conditional instead and get normal results.