← Open Source
facebookresearch

QuaterNet

Proposes neural networks that can generate animation of virtual characters for different actions.

Model DevelopmentArchitectureJupyter Notebook
Open on GitHub
Momentum
+0stars in 24 hours0.0%
709
Stars
85
Forks
+-1
This week
2
Contributors
Created 2018-05-12 · Updated 2026-10-13 · #14717 today
Top developers
dariopavllomichaelauli

facebookresearch/QuaterNet is ranked 14,717 with 709 stars.

Same-category comparison

facebookresearch/QuaterNet is ranked 14,717 among these 8 peers; chainer/chainer-chemistry is ranked 14,715.

Same-category comparison
NameRankMetrics
titu1994/DenseNet14,712
Language:
Python
Stars:
710
Forks:
291
Description:
DenseNet implementation in Keras.
MarioSieg/magnetron14,713
Language:
C
Stars:
709
Forks:
39
Description:
A zero-dependency ML framework in C with a modern Python API for full control over execution and memory.
Zhendong-Wang/Diffusion-GAN14,714
Language:
Python
Stars:
709
Forks:
75
Description:
Official PyTorch implementation for paper: Diffusion-GAN: Training GANs with Diffusion.
chainer/chainer-chemistry14,715
Language:
Python
Stars:
709
Forks:
132
Description:
Chainer Chemistry: A Library for Deep Learning in Biology and Chemistry.
kwsong0113/diffusion-forcing-transformer14,719
Language:
Python
Stars:
709
Forks:
41
Description:
[ICML 2025] Official PyTorch Implementation of "History-Guided Video Diffusion".
pymc-devs/pymc414,721
Language:
Jupyter Notebook
Stars:
709
Forks:
112
Description:
(Deprecated) Experimental PyMC interface for TensorFlow Probability. Official work on this project has been discontinued.
wohlert/semi-supervised-pytorch14,724
Language:
Python
Stars:
709
Forks:
121
Description:
Implementations of various VAE-based semi-supervised and generative models in PyTorch.
GoodStartLabs/AI_Diplomacy14,728
Language:
Python
Stars:
708
Forks:
99
Description:
Frontier Models playing the board game Diplomacy.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageJupyter Notebook
CategoryModel Development
SubcategoryArchitecture
Keywords3D
Stars709
Forks85
Contributors2
Created date2018-05-12
Updated date2026-10-13
Stars in 1 day0
Stars in 7 days-1
Rank14,717
Previous rank14,562
Rank change-155
7-day stars rank17,691
Previous 7-day stars rank17,646
7-day stars rank change-45
Total stars rank14,747
Previous total stars rank14,722
Total stars rank change-25
CountryUSA
README summary

QuaterNet: A Quaternion-based Recurrent Model for Human Motion This is the implementation of the approach described in the paper: Dario Pavllo, David Grangier, and Michael Auli. QuaterNet: A Quaternion-based Recurrent Model for Human Motion. In *British Machine Vision Conference (BMVC)*, 2018. We provide the code for reproducing our results (*short-term prediction*) and generating/rendering locomotion animations (*long-term generation*), as well as pre-trained models. Abstract Deep learning for predicting or generating 3D human pose sequences is

an active research area. Previous work regresses either joint rotations or joint positions. The former strategy is prone to error accumulation along the kinematic chain, as well as discontinuities when using Euler angle or exponential map parameterizations. The latter requires re-projection onto skeleton constraints to avoid bone stretching and invalid configurations. Our recurrent network, *QuaterNet*, represents rotations with quaternions and our loss function performs forward kinematics on a skeleton to penalize absolute position errors instead of angle errors. On

short-term predictions, *QuaterNet* improves the state-of-the-art quantitatively. For long-term generation, our approach is qualitatively judged as realistic as recent neural strategies from the graphics literature. Dependencies Python 3+ distribution PyTorch >= 0. 0 NumPy and SciPy Optional: Matplotlib, if you want to render and display interactive animations. Additionally, you need *ffmpeg* to export MP4 videos, and *imagemagick* to export GIFs. A decent GPU, if you want to train the models in reasonable time. If you plan

on testing the pretrained models, the CPU is fine. The scripts detect automatically if a GPU is available. If you want to force CPU training/generation, you can set the environment variable to an empty value. Within bash, you can limit its scope to a single command by calling . Short-term prediction If you want to train the model from scratch, you have to run the download script first: This will download the Human3. 6M dataset, convert it to our

encoding, and save it in . Then, train the model and test it: If you use the pre-trained model you don't need to download the dataset and you can run the test script directly. Make sure that is in the same directory as the script. The script reproduces the *zero-velocity baseline*, and should yield the same results as Martinez et al. Long-term generation of locomotion For locomotion we rely on Holden's et al. 6M, as the former contains

a wider variety of motion. As before, if you want to train the models yourself instead of using the pretrained ones, download and convert the dataset by launching: The data will be saved in . Then, you have to train the *pace network* and *pose network* separately: If your system has more than one GPU, you can save time by training all models in parallel: Once you have the weight files and in place, take a look at the notebook , which

shows how to render an animation. The script performs predictions across the entire dataset and shows them on an interactive

Frequently asked questions

How many stars and forks are recorded?

facebookresearch/QuaterNet has 709 stars and 85 forks.

What is the repository rank?

facebookresearch/QuaterNet is ranked 14,717.

What language and category are recorded?

facebookresearch/QuaterNet has 709 stars, uses Jupyter Notebook and belongs to Model Development.

Which repository is closest in rank?

facebookresearch/QuaterNet is compared with chainer/chainer-chemistry, ranked 14,715 with 709 stars.

README

QuaterNet: A Quaternion-based Recurrent Model for Human Motion

This is the implementation of the approach described in the paper:

Dario Pavllo, David Grangier, and Michael Auli. QuaterNet: A Quaternion-based Recurrent Model for Human Motion. In British Machine Vision Conference (BMVC), 2018.

We provide the code for reproducing our results (short-term prediction) and generating/rendering locomotion animations (long-term generation), as well as pre-trained models.

Abstract

Deep learning for predicting or generating 3D human pose sequences is an active research area. Previous work regresses either joint rotations or joint positions. The former strategy is prone to error accumulation along the kinematic chain, as well as discontinuities when using Euler angle or exponential map parameterizations. The latter requires re-projection onto skeleton constraints to avoid bone stretching and invalid configurations. This work addresses both limitations. Our recurrent network, QuaterNet, represents rotations with quaternions and our loss function performs forward kinematics on a skeleton to penalize absolute position errors instead of angle errors. On short-term predictions, QuaterNet improves the state-of-the-art quantitatively. For long-term generation, our approach is qualitatively judged as realistic as recent neural strategies from the graphics literature.

Dependencies

  • Python 3+ distribution
  • PyTorch >= 0.4.0
  • NumPy and SciPy

Optional:

  • Matplotlib, if you want to render and display interactive animations. Additionally, you need ffmpeg to export MP4 videos, and imagemagick to export GIFs.
  • A decent GPU, if you want to train the models in reasonable time. If you plan on testing the pretrained models, the CPU is fine.

The scripts detect automatically if a GPU is available. If you want to force CPU training/generation, you can set the CUDA_VISIBLE_DEVICES environment variable to an empty value. Within bash, you can limit its scope to a single command by calling CUDA_VISIBLE_DEVICES= python .

Short-term prediction

If you want to train the model from scratch, you have to run the download script first:

python prepare_data_short_term.py

This will download the Human3.6M dataset, convert it to our encoding, and save it in datasets/dataset_h36m.npz. Then, train the model and test it:

python train_short_term.py
python test_short_term.py

If you use the pre-trained model you don't need to download the dataset and you can run the test script directly. Make sure that weights_short_term.bin is in the same directory as the script.

The script baseline_short_term.py reproduces the zero-velocity baseline, and should yield the same results as Martinez et al. 2017.

Long-term generation of locomotion

For locomotion we rely on Holden's et al. dataset instead of Human3.6M, as the former contains a wider variety of motion. As before, if you want to train the models yourself instead of using the pretrained ones, download and convert the dataset by launching:

python prepare_data_long_term.py

The data will be saved in datasets/dataset_locomotion.npz. Then, you have to train the pace network and pose network separately:

python train_pace_network.py
python train_long_term.py

If your system has more than one GPU, you can save time by training all models in parallel:

CUDA_VISIBLE_DEVICES=0 python train_pace_network.py
CUDA_VISIBLE_DEVICES=1 python train_long_term.py

Once you have the weight files weights_pace_network.bin and weights_long_term.bin in place, take a look at the notebook visualization.ipynb, which shows how to render an animation. The script test_long_term.py performs predictions across the entire dataset and shows them on an interactive 3D plot. You can also generate animations in an offline fashion and export them as MP4 videos or GIFs.

  • python test_long_term.py: visualize all animations interactively (GUI).
  • python test_long_term.py --list: list the animations in the dataset.
  • python test_long_term.py run_1_d0: visualize the animation run_1_d0 interactively (GUI).
  • python test_long_term.py run_1_d0 output.mp4: render run_1_d0 and save it as output.mp4.
  • python test_long_term.py run_1_d0 output.gif: render run_1_d0 and save it as output.gif.

Expected training/generation time

NVIDIA Pascal GP100 (Quadro GP100, Tesla P100):

  • Short-term pose network: 22 min for 3000 epochs (0.44 s/epoch), batch size = 60
  • Long-term pose network: 2h 10 min for 4000 epochs (1.95 s/epoch), batch size = 40
  • Pace network: 10 min for 2000 epochs (0.3 s/epoch), batch size = 40
  • Generation: 900 FPS, batch size = 1

NVIDIA Maxwell GM200 (Tesla M40, Titan X, GeForce 980 Ti, Quadro M6000):

  • Short-term pose network: 32 min for 3000 epochs (0.64 s/epoch), batch size = 60
  • Long-term pose network: 2h 45 min for 4000 epochs (2.5 s/epoch), batch size = 40
  • Pace network: 10 min for 2000 epochs (0.3 s/epoch), batch size = 40
  • Generation: 820 FPS, batch size = 1

Pre-trained models

You can download them from the Releases section of this repository. You only need to put the weight files weights_pace_network.bin, weights_long_term.bin, and weights_short_term.bin in the root directory.

License

This work is licensed under CC BY-NC. See LICENSE for details. Third-party datasets are subject to their respective licenses. If you use our code/models in your research, please cite our paper:

@inproceedings{pavllo:quaternet:2018,
  title={QuaterNet: A Quaternion-based Recurrent Model for Human Motion},
  author={Pavllo, Dario and Grangier, David and Auli, Michael},
  booktitle={British Machine Vision Conference (BMVC)},
  year={2018}
}
Nearby in the ranking
Similar items