← 开源
Mael-zys

T2M-GPT

(CVPR 2023) Pytorch implementation of “T2M-GPT: Generating Human Motion from Textual Descriptions with Discrete Representations”

ModelsVision modelsPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
781
Star
65
Fork
+2
本周
5
贡献者
创建于 2023-01-13 · 更新于 2026-10-12 · 今日第 13884 名
主要开发者
Mael-zysXiSHEN0220Jiro-zhang

Mael-zys/T2M-GPT 排名第 13,884,有 781 个星标。

同类别比较

Mael-zys/T2M-GPT 排名第 13,884,此处有 8 个同类条目;wtjiang98/PSGAN 排名第 13,889。

同类别比较
名称排名指标
PaddlePaddle/RocketQA13,854
语言:
Python
星标数:
784
分叉数:
122
简介:
🚀 RocketQA, dense retrieval for information retrieval and question answering, including both Chinese and English state-of-the-art models.
cszn/DPIR13,858
语言:
Python
星标数:
784
分叉数:
112
简介:
Plug-and-Play Image Restoration with Deep Denoiser Prior (IEEE TPAMI 2021) (PyTorch)
AMAP-ML/DreamX-World13,867
语言:
Python
星标数:
783
分叉数:
52
简介:
DreamX-World: A General-Purpose Interactive World Model
CMKRG/QiZhenGPT13,875
语言:
Python
星标数:
782
分叉数:
90
简介:
QiZhenGPT: An Open Source Chinese Medical Large Language Model|一个开源的中文医疗大语言模型
wtjiang98/PSGAN13,889
语言:
Python
星标数:
781
分叉数:
150
简介:
PyTorch code for "PSGAN: Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer" (CVPR 2020 Oral)
Alibaba-MIIL/ImageNet21K13,890
语言:
Python
星标数:
780
分叉数:
71
简介:
Official Pytorch Implementation of: "ImageNet-21K Pretraining for the Masses"(NeurIPS, 2021) paper
ankandrew/fast-plate-ocr13,895
语言:
Python
星标数:
780
分叉数:
102
简介:
Lightweight & fast OCR models for license plate text recognition.
facebookresearch/contriever13,897
语言:
Python
星标数:
780
分叉数:
69
简介:
Contriever: Unsupervised Dense Information Retrieval with Contrastive Learning
关键参数与规格
关键参数与规格
参数值
语言Python
类别Models
子类别Vision models
关键词3D
星标数781
分叉数65
贡献者5
创建日期2023-01-13
更新日期2026-10-12
1 天星标数0
7 天星标数2
排名13,884
上次排名13,771
排名变化-113
7 天星标排名8,502
上次 7 天星标排名8,578
7 天星标排名变化76
总星标排名13,609
上次总星标排名13,586
总星标排名变化-23
国家China
README 摘录

(CVPR 2023) T2M-GPT Pytorch implementation of paper "T2M-GPT: Generating Human Motion from Textual Descriptions with Discrete Representations" [[Project Page]]( [[Paper]]( [[Notebook Demo]]( [[HuggingFace]]( [[Space Demo]]( [[T2M-GPT+]]( If our project is helpful for your research, please consider citing : Table of Content 1. Visual Results (More results can be found in our project page) 2. Environment Our model can be learnt in a **single GPU V100-32G** The code was tested on Python 3. Datasets We are using two

3D human motion-language dataset: HumanML3D and KIT-ML. For both datasets, you could find the details as well as download link [[here]]( Take HumanML3D for an example, the file directory should look like this: 2. Motion & text feature extractors: We use the same extractors provided by t2m to evaluate our generated motions. Pre-trained models The pretrained model files will be stored in the 'pretrained' folder: 2. Render SMPL mesh (optional) If you want to render the generated motion

, you need to install: 3. Quick Start A quick start guide of how to use our code is available in demo. VQ-VAE The results are saved in the folder output. GPT The results are saved in the folder output. GPT GPT eval Follow the evaluation setting of text-to-motion, we evaluate our model 20 times and report the average result. Due to the multimodality part where we should generate 30 motions from the same text, the evaluation takes

a long time. SMPL Mesh Rendering SMPL Mesh Rendering You should input the npy folder address and the motion names. Acknowledgement We appreciate helps from : public code like text-to-motion, TM2T, MDM, MotionDiffuse etc. Mathis Petrovich , Yuming Du , Yingyi Chen , Dexiong Chen and Xuelin Chen for inspiring discussions and valuable feedback. Minh Chien Vu for the hugging face space demo. ChangLog 2023/02/19 add the hugging face space demo for both skelton and SMPL mesh visualization.

常见问题

记录了多少星标和分叉?

Mael-zys/T2M-GPT 有 781 个星标和 65 个分叉。

仓库排名是多少?

Mael-zys/T2M-GPT 排名第 13,884。

记录的语言和类别是什么?

Mael-zys/T2M-GPT 有 781 个星标,语言为 Python,类别为 Models。

哪个仓库排名最接近?

Mael-zys/T2M-GPT 与 wtjiang98/PSGAN 比较,后者排名第 13,889,有 781 个星标。

README

(CVPR 2023) T2M-GPT

Pytorch implementation of paper "T2M-GPT: Generating Human Motion from Textual Descriptions with Discrete Representations"

[Project Page] [Paper] [Notebook Demo] [HuggingFace] [Space Demo] [T2M-GPT+]

If our project is helpful for your research, please consider citing :

@inproceedings{zhang2023generating,
  title={T2M-GPT: Generating Human Motion from Textual Descriptions with Discrete Representations},
  author={Zhang, Jianrong and Zhang, Yangsong and Cun, Xiaodong and Huang, Shaoli and Zhang, Yong and Zhao, Hongwei and Lu, Hongtao and Shen, Xi},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2023},
}

Table of Content

1. Visual Results (More results can be found in our project page)

Text: a man steps forward and does a handstand.

GT

T2M

MDM

MotionDiffuse

Ours

Text: A man rises from the ground, walks in a circle and sits back down on the ground.

GT

T2M

MDM

MotionDiffuse

Ours

2. Installation

2.1. Environment

Our model can be learnt in a single GPU V100-32G

conda env create -f environment.yml
conda activate T2M-GPT

The code was tested on Python 3.8 and PyTorch 1.8.1.

2.2. Dependencies

bash dataset/prepare/download_glove.sh

2.3. Datasets

We are using two 3D human motion-language dataset: HumanML3D and KIT-ML. For both datasets, you could find the details as well as download link [here].

Take HumanML3D for an example, the file directory should look like this:

./dataset/HumanML3D/
├── new_joint_vecs/
├── texts/
├── Mean.npy # same as in [HumanML3D](https://github.com/EricGuo5513/HumanML3D) 
├── Std.npy # same as in [HumanML3D](https://github.com/EricGuo5513/HumanML3D) 
├── train.txt
├── val.txt
├── test.txt
├── train_val.txt
└── all.txt

2.4. Motion & text feature extractors:

We use the same extractors provided by t2m to evaluate our generated motions. Please download the extractors.

bash dataset/prepare/download_extractor.sh

2.5. Pre-trained models

The pretrained model files will be stored in the 'pretrained' folder:

bash dataset/prepare/download_model.sh

2.6. Render SMPL mesh (optional)

If you want to render the generated motion, you need to install:

sudo sh dataset/prepare/download_smpl.sh
conda install -c menpo osmesa
conda install h5py
conda install -c conda-forge shapely pyrender trimesh mapbox_earcut

3. Quick Start

A quick start guide of how to use our code is available in demo.ipynb

4. Train

Note that, for kit dataset, just need to set '--dataname kit'.

4.1. VQ-VAE

The results are saved in the folder output.

VQ training

python3 train_vq.py \
--batch-size 256 \
--lr 2e-4 \
--total-iter 300000 \
--lr-scheduler 200000 \
--nb-code 512 \
--down-t 2 \
--depth 3 \
--dilation-growth-rate 3 \
--out-dir output \
--dataname t2m \
--vq-act relu \
--quantizer ema_reset \
--loss-vel 0.5 \
--recons-loss l1_smooth \
--exp-name VQVAE

4.2. GPT

The results are saved in the folder output.

GPT training

python3 train_t2m_trans.py  \
--exp-name GPT \
--batch-size 128 \
--num-layers 9 \
--embed-dim-gpt 1024 \
--nb-code 512 \
--n-head-gpt 16 \
--block-size 51 \
--ff-rate 4 \
--drop-out-rate 0.1 \
--resume-pth output/VQVAE/net_last.pth \
--vq-name VQVAE \
--out-dir output \
--total-iter 300000 \
--lr-scheduler 150000 \
--lr 0.0001 \
--dataname t2m \
--down-t 2 \
--depth 3 \
--quantizer ema_reset \
--eval-iter 10000 \
--pkeep 0.5 \
--dilation-growth-rate 3 \
--vq-act relu

5. Evaluation

5.1. VQ-VAE

VQ eval

python3 VQ_eval.py \
--batch-size 256 \
--lr 2e-4 \
--total-iter 300000 \
--lr-scheduler 200000 \
--nb-code 512 \
--down-t 2 \
--depth 3 \
--dilation-growth-rate 3 \
--out-dir output \
--dataname t2m \
--vq-act relu \
--quantizer ema_reset \
--loss-vel 0.5 \
--recons-loss l1_smooth \
--exp-name TEST_VQVAE \
--resume-pth output/VQVAE/net_last.pth

5.2. GPT

GPT eval

Follow the evaluation setting of text-to-motion, we evaluate our model 20 times and report the average result. Due to the multimodality part where we should generate 30 motions from the same text, the evaluation takes a long time.

python3 GPT_eval_multi.py  \
--exp-name TEST_GPT \
--batch-size 128 \
--num-layers 9 \
--embed-dim-gpt 1024 \
--nb-code 512 \
--n-head-gpt 16 \
--block-size 51 \
--ff-rate 4 \
--drop-out-rate 0.1 \
--resume-pth output/VQVAE/net_last.pth \
--vq-name VQVAE \
--out-dir output \
--total-iter 300000 \
--lr-scheduler 150000 \
--lr 0.0001 \
--dataname t2m \
--down-t 2 \
--depth 3 \
--quantizer ema_reset \
--eval-iter 10000 \
--pkeep 0.5 \
--dilation-growth-rate 3 \
--vq-act relu \
--resume-trans output/GPT/net_best_fid.pth

6. SMPL Mesh Rendering

SMPL Mesh Rendering

You should input the npy folder address and the motion names. Here is an example:

python3 render_final.py --filedir output/TEST_GPT/ --motion-list 000019 005485

7. Acknowledgement

We appreciate helps from :

8. ChangLog

  • 2023/02/19 add the hugging face space demo for both skelton and SMPL mesh visualization.
排名相邻
同类项目