功能概述
输入一段英文文本,生成符合文本描述的3D人体运动序列(Skeleton-Based)
输入示例:
‘a man is walking ’
输出示例: 输出为
环境准备
从github下载代码:
git clone https://github.com/ZcyMonkey/T2MGPT_for_modelscope.git
进入文件夹
cd T2MGPT_for_modelscope
配置环境
conda env create -f environment.yml
conda activate T2M-GPT
运行代码
在根目录下运行以下代码即可
from modelscope.pipelines import pipeline
import visualization.plot_3d_global as plot_3d
import ms_wrapper
model = 'zhongchongyang/T2MGPT_text-driven_motion_generation'
text = 'a man is walking'
outdir = './'
inference = pipeline('text-driven_motion_generation', model=model,model_revision='v1.0.0')
output = inference(text)
_ = plot_3d.draw_to_batch(output.detach().cpu().numpy(),text, [outdir+text+'.gif'])
评论