GAITGen represents gait sequences as discrete motion tokens with an RVQ-VAE tokenizer, then learns transformer models over those tokens for conditional gait motion modeling. The code supports standard and disentangled VQ-VAE variants, masked transformer training, and residual transformer training.
- Release dataset pre-processed representations
- Release pretrained checkpoints
- Released code 🔥
- Accepted to WACV 2026
- Proposed GAITGen, a disentangled motion-pathology generative framework for impaired gait motion generation in the clinical domain
Create the Conda environment:
conda env create -f environment.yml
conda activate gaitgenAlternatively, install the Python dependencies in an existing Python 3.10 environment:
pip install -r requirements.txtDownload the GloVe files used by the motion-language evaluator:
bash prepare/download_glove.shSet the dataset root in:
data/configs/base.yaml
Configure the PDGaM dataset paths in:
data/configs/pdgam.yaml
The processed dataset is expected to contain HumanML3D-style motion features:
PDGaM/
├── Annotations/
│ └── Gait/
│ ├── train.csv
│ └── test.csv
└── representation_HML3D/
├── new_joint_vecs/
│ ├── <sequence_id>.npy
│ └── <sequence_id>_M.npy
├── Mean.npy
├── Std.npy
├── train.txt
├── test.txt
├── train_tiny.txt
└── test_tiny.txt
train_tiny.txt and test_tiny.txt are optional convenience splits used when passing --tiny.
Validation uses a pretrained motion-language evaluator. Place the evaluator checkpoint at:
checkpoints/pdgam/text_mot_match/model/finest.tar
The evaluator option metadata used by the training scripts is stored at:
checkpoints/pdgam/Comp_v6_KLD005/opt.txt
All commands below assume the PDGaM configuration files have been updated and the evaluator assets are available.
python train_vq.py \
--name gaitgen_vq_tokenizer \
--gpu_id 0 \
--dataset_name '["pdgam"]'The tokenizer defaults correspond to the disentangled conditional RVQ-VAE training recipe used for GAITGen. Pass explicit options to override individual hyperparameters.
This command writes the tokenizer checkpoint to:
checkpoints/pdgam/gaitgen_vq_tokenizer/
Set --vq_name to the trained disentangled RVQ-VAE experiment name.
python train_t2m_transformer.py \
--name gaitgen_mask_transformer \
--gpu_id 0 \
--dataset_name '["pdgam"]' \
--batch_size 64 \
--vq_name gaitgen_vq_tokenizer \
--latent_dim 128 \
--n_heads 6 \
--disentangledpython train_res_transformer.py \
--name gaitgen_residual_transformer \
--gpu_id 0 \
--dataset_name '["pdgam"]' \
--batch_size 64 \
--vq_name gaitgen_vq_tokenizer \
--cond_drop_prob 0.2 \
--share_weight \
--disentangledTraining outputs are written under:
checkpoints/<dataset_name>/<experiment_name>/
log/
wandb/
If you use this code, please cite:
@inproceedings{adeli2026gaitgen,
title={GAITGen: Disentangled Motion-Pathology Impaired Gait Generative Model -- Bringing Motion Generation to the Clinical Domain},
author={Vida Adeli, Soroush Mehraban, Majid Mirmehdi, Alan Whone, Benjamin Filtjens, Amirhossein Dadashzadeh, Alfonso Fasano, Andrea Iaboni, Babak Taati},
booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
year={2026}
}We acknowledge MoMask for its open-source implementation.
See LICENSE.