TrajeVAE - Controllable Human Motion Generation from Trajectories

Kacper Kania, Marek Kowalski, Tomasz TrzcinskiarXiv 2021

Abstract

The creation of plausible and controllable 3D human motion animations is a long-standing problem that requires the manual intervention of skilled artists. Current machine learning approaches can semi-automate the process; however, they are limited in a significant way: they typically handle only a single trajectory of the expected motion, which precludes fine-grained control over the output. To mitigate this issue, we reformulate the problem of future pose prediction into pose completion in space and time, where multiple trajectories are represented as poses with missing joints. We show that such a framework can generalize to other neural networks designed for future pose prediction. Once trained in this framework, a model is capable of predicting sequences from any number of trajectories. We propose a novel transformer-like architecture, TrajeVAE, that builds on this idea and provides a versatile framework for 3D human animation. We demonstrate that TrajeVAE offers better accuracy than trajectory-based reference approaches and methods that base their predictions on past poses. We also show that it can predict reasonable future poses even if provided only with an initial pose.

Introduction

Creating realistic 3D human animation is traditionally a labor-intensive process requiring skilled artists to "key-frame" joint positions. While machine learning has attempted to automate this, existing methods usually fall into two camps: they either predict future motion based on a fixed set of past frames—offering little control over the path of the motion—or they follow a single trajectory (usually the pelvis), which lacks the fine-grained control needed for complex actions like waving or dancing.

TrajeVAE addresses this gap by providing a model that is controllable (follows specific joint paths), stochastic (can produce multiple different valid motions for the same input), and flexible (can handle a variable number of input signals, from a single joint to a nearly full skeleton).

Methods

The core innovation of TrajeVAE is treating motion generation as a structured pose completion problem. Instead of seeing a trajectory as a separate control signal, the authors treat it as a sequence of poses where most joints are "missing" (masked out). This unified framework allows the model to learn the underlying kinematic relationships between joints.

The TrajeVAE architecture utilizes a Transformer-based CVAE and operates in the frequency domain via Discrete Cosine Transform (DCT).

Key Components:

  • Transformer-based CVAE: Unlike traditional Recurrent Neural Networks (RNNs) that generate motion frame-by-frame (which is slow and prone to "drift"), TrajeVAE uses a Transformer architecture to process and generate the entire sequence in parallel.
  • Frequency Domain Representation: The model operates on joint coordinates transformed via Discrete Cosine Transform (DCT). Since most human motion is concentrated in low-frequency components, sampling in the frequency domain allows the model to generate smoother, more diverse animations.
  • Learnable Prior: Standard VAEs often struggle with diversity because they force the latent space into a simple Gaussian distribution. TrajeVAE uses a learnable prior conditioned on the input trajectories, allowing it to better map the complex relationship between a partial trajectory and a full-body pose.
  • Parallel Offset Decoding: The decoder predicts joint "offsets" relative to the previous frame and the initial pose. This ensures the motion remains grounded and allows the model to generate reasonable futures even if only an initial pose is provided.

Key Results

TrajeVAE was evaluated on the Human3.6m dataset, outperforming existing baselines like MotionGAN and Motion Infilling in both diversity and accuracy.

Qualitative results showing how increasing the number of input trajectories leads to better reconstruction of ground truth sequences for various actions like walking a dog, eating, and discussion.
  • Accuracy: The Reconstruction Error (ADE) significantly improves as more trajectories are added. On the Human3.6m dataset, the error drops from 0.518 (with 0 trajectories) to 0.325 (with 4 trajectories).
  • Diversity: Even when constrained by 4 trajectories, TrajeVAE maintains a higher Average Pairwise Distance (APD) than deterministic models, meaning it still produces varied animations rather than just a single average motion.
  • Zero-Trajectory Generation: A surprising result is that the model can generate plausible, diverse animations (like waving or bending) given only an initial starting pose, outperforming models specifically designed for that task.

Conclusion and Limitations

By viewing trajectories as "poses with missing joints," TrajeVAE creates a single model that can handle everything from zero control to high-precision multi-joint tracking. However, some limitations remain. The model uses a Mean Squared Error (MSE) loss, meaning it treats trajectories as "suggestions" rather than hard constraints. Additionally, because the model operates on 3D coordinates rather than joint angles, it can occasionally violate physical constraints (e.g., bone stretching) if the input is highly ambiguous. Future work may explore using joint rotations or accounting for complex interactions with objects and other characters.

Summary updated

BibTeX
@misc{kania2021trajevae,
  author = {Kacper Kania and Marek Kowalski and Tomasz Trzcinski},
  title = {{TrajeVAE - Controllable Human Motion Generation from Trajectories}},
  year = {2021},
  eprint = {2104.00351},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.00351},
}
Figure