Hourglass Tokenizer for Efficient Transformer-Based 3D Human Pose Estimation

Wenhao Li, Mengyuan Liu, Hong Liu, Pichao Wang, Jialun Cai, Nicu Sebe

TL;DR

The Hourglass Tokenizer (HoT) is a "plug-and-play" framework that slashes the computational cost of 3D human pose estimation in videos by up to 50%. By dynamically pruning redundant video frames and later "recovering" them through a specialized attention mechanism, HoT allows heavy Transformer models to run significantly faster on consumer hardware without sacrificing accuracy.

The Challenge of Video Pose Transformers

Estimating 3D human poses from video is a cornerstone of action recognition, human-robot interaction, and animation. Recently, Video Pose Transformers (VPTs) have become the gold standard because they excel at modeling long-range temporal dependencies—essentially "understanding" how a movement in frame 1 relates to a movement in frame 200.

However, Transformers suffer from quadratic complexity. As the number of video frames (tokens) increases, the computational cost explodes. To achieve high accuracy, researchers often use sequences of 243 or even 351 frames, making these models too heavy for real-time use or resource-constrained devices. Since video is highly redundant—adjacent frames are often nearly identical—processing every single frame with the same intensity is computationally wasteful.

The Hourglass Tokenizer (HoT) Framework

The authors introduce the Hourglass Tokenizer (HoT), a framework that transforms the internal data flow of a Transformer from a "rectangle" (processing all tokens in every layer) to an "hourglass" (pruning tokens in the middle and expanding them at the end).

The HoT architecture showing the Token Pruning Cluster and Token Recovering Attention modules.

The framework consists of two novel modules:

  1. Token Pruning Cluster (TPC): Instead of uniform sampling, TPC uses a density-based clustering algorithm (DPC-kNN) to identify "representative" tokens with high semantic diversity. It preserves unique poses and discards redundant ones, thinning the workload for the middle layers.
  2. Token Recovering Attention (TRA): Since many applications require a 3D pose for every input frame, TRA uses a lightweight cross-attention mechanism to map compressed information back onto a full-length sequence of learnable tokens, restoring the original temporal resolution.

Key Insights: Semantic Diversity and Redundancy

The core innovation lies in prioritizing semantic diversity over uniformity. A person mid-backflip provides more information than a person standing still. By using clustering to select tokens, the model preserves the most informative parts of the motion. Furthermore, the authors observed that tokens become more similar in deeper layers, suggesting that aggressive pruning is most effective deep within the network.

Experimental Results

The researchers evaluated HoT on the Human3.6M and MPI-INF-3DHP benchmarks. The results demonstrate a significant efficiency-accuracy trade-off improvement.

Comparison of FLOPs vs. MPJPE for various models, highlighting the efficiency gains of HoT.
  • Efficiency Gains: Applied to MotionBERT, HoT reduced FLOPs by 51.8% and increased inference speed (FPS) by 74.4% with zero accuracy loss.
  • Accuracy Retention: On MixSTE, it achieved a 39.6% reduction in FLOPs with a negligible 0.2% drop in accuracy.
  • Competitive Performance: In several cases, the pruned models outperformed other state-of-the-art models using full frame counts, proving that intelligent token selection can enhance performance.

Conclusion and Future Work

While HoT significantly improves efficiency, it remains dependent on the quality of initial 2D joint detectors. Future work aims to leverage HoT to enable even larger, more powerful VPTs that were previously too computationally expensive to deploy, potentially pushing the boundaries of real-time motion capture.

Summary updated

BibTeX
@inproceedings{li2023hourglass,
  author = {Wenhao Li and Mengyuan Liu and Hong Liu and Pichao Wang and Jialun Cai and Nicu Sebe},
  title = {{Hourglass Tokenizer for Efficient Transformer-Based 3D Human Pose Estimation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure