Skip to content

TaatiTeam/GAITGen

Repository files navigation

GAITGen: Disentangled Motion-Pathology Impaired Gait Generative Model

✨ Bringing Motion Generation to the Clinical Domain ✨ (WACV 2026)

arXiv Project Page

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.

🎉 News

  • 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

Contents

Installation

Create the Conda environment:

conda env create -f environment.yml
conda activate gaitgen

Alternatively, install the Python dependencies in an existing Python 3.10 environment:

pip install -r requirements.txt

Download the GloVe files used by the motion-language evaluator:

bash prepare/download_glove.sh

Data Preparation

Set 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.

Evaluator Assets

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

Training

All commands below assume the PDGaM configuration files have been updated and the evaluator assets are available.

1. Train The Disentangled Conditional RVQ-VAE Tokenizer

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/

2. Train The Masked Transformer

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 \
  --disentangled

3. Train The Residual Transformer

python 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 \
  --disentangled

Training outputs are written under:

checkpoints/<dataset_name>/<experiment_name>/
log/
wandb/

Citation

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}
}

Acknowledgements

We acknowledge MoMask for its open-source implementation.

License

See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

14 stars

Watchers

5 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages