MotionGPT3 icon indicating copy to clipboard operation
MotionGPT3 copied to clipboard

Motion to Text generation results are messy code

Open Zhengyu-Li opened this issue 1 year ago • 6 comments

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 using language.#M000307.npy Describe the action being represented by using text.#009877.npy

But the output text is messy code: 0 --------------- _______ ~~~~ ~~~~~~~~~~ �� _____ ________ ________________ ____ ________________________ <|endoftext|> 1   ��� �� <|endoftext|>

Zhengyu-Li avatar Nov 10 '25 10:11 Zhengyu-Li

Same

haoyuhsu avatar Nov 10 '25 23:11 haoyuhsu

I have resolved the issue, you need to use the forward function in motion2text.

haoyuhsu avatar Nov 11 '25 04:11 haoyuhsu

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 avatar Nov 11 '25 06:11 Zhengyu-Li

@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!

haoyuhsu avatar Nov 15 '25 19:11 haoyuhsu

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.

BoifZ avatar Nov 28 '25 13:11 BoifZ

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.

Zhengyu-Li avatar Dec 16 '25 06:12 Zhengyu-Li