Spatial-Temporal Transformer based Video Compression Framework

Yanbo Gao, Wenjia Huang, Shuai Li, Hui Yuan, Mao Ye, Siwei MaarXiv 2023 · DOI

Abstract

The Spatial-Temporal Transformer based Video Compression (STT-VC) framework represents a significant advancement in learned video compression (LVC) by replacing traditional CNN-based modules with specialized Transformer architectures. By leveraging the inherent similarity-matching capabilities of Transformers for motion estimation and residual coding, STT-VC addresses the "color-to-geometry gap" and exploits spatial correlations between predictions and residuals. Experimental results demonstrate that STT-VC achieves a 13.5% BD-Rate saving over the VTM-17.0 (H.266/VVC) standard, outperforming existing state-of-the-art learned models.

Introduction

Traditional video compression standards rely on hand-crafted algorithms for motion estimation and residual coding. While "Learned Video Compression" (LVC) using neural networks has emerged as a powerful alternative, it faces two major hurdles. First, the Color-to-Geometry Gap: most LVC models use CNNs to estimate motion (like optical flow), but it is mathematically difficult for standard CNNs to stably transform color features into geometric motion features using only gradient descent. Second, Module Independence: many systems treat prediction and residual as independent, ignoring that spatial patterns in the prediction often mirror those in the residual.

STT-VC addresses these by arguing that the self-attention mechanism in Transformers is fundamentally a similarity-matching process, making them naturally suited for motion estimation and alignment tasks.

Methods

The STT-VC framework integrates three core components designed to optimize temporal and spatial redundancy exploitation.

Overview of the STT-VC framework, illustrating the interaction between RDT, MGP, and SFD modules.

Relaxed Deformable Transformer (RDT)

Instead of relying solely on CNNs for motion estimation, RDT utilizes a U-shaped Transformer (Uformer) to calculate similarity between frames. It generates offsets and confidence masks, which are then "relaxed" into a Deformable Convolution (DConv). This approach combines the global reasoning of Transformers with the efficiency of convolutions to align reference frames more accurately than standard optical flow.

Multi-Granularity Prediction (MGP)

Unlike models that only consider the immediate previous frame, MGP leverages three previous reference frames. It treats the initial coarse prediction as a "noisy" version of the current frame and uses temporal information from older frames to denoise and refine it through spatial-channel attention, deciding which parts of which frames are most useful.

Spatial Feature Distribution prior based Transformer (SFD-T)

This module handles residual compression by using spatial information from the temporal prediction to guide the Transformer's self-attention. By recognizing that residuals often follow the structural patterns of the predicted image, SFD-T significantly reduces the bits required for error coding.

Experimental Results

STT-VC was trained on the Vimeo-90K dataset and evaluated against standard benchmarks including HEVC (Classes B-E), UVG, and MCL-JCV.

Rate-Distortion (RD) curves comparing STT-VC against VTM-17.0 and other state-of-the-art learned video compression models across multiple datasets.

The framework achieved an average of 13.5% BD-Rate saving compared to VTM-17.0. Ablation studies highlighted the impact of the proposed modules: the RDT alone provided an 18.9% improvement over a baseline CNN model, while the full STT-VC suite reached a 68.7% gain over the baseline. Qualitatively, STT-VC preserves sharper edges and more accurate motion in fast-moving objects compared to previous methods.

Conclusion

STT-VC demonstrates the power of specialized Transformer architectures in video compression. By bridging the color-to-geometry gap and exploiting structural priors in residuals, it sets a new benchmark for learned compression. While the computational complexity and memory footprint of multi-frame Transformer processing remain challenges, the framework provides a robust foundation for future research into dynamic rate-distortion trade-offs within Transformer layers.

Summary updated

BibTeX
@misc{gao2023spatial,
  author = {Yanbo Gao and Wenjia Huang and Shuai Li and Hui Yuan and Mao Ye and Siwei Ma},
  title = {{Spatial-Temporal Transformer based Video Compression Framework}},
  year = {2023},
  eprint = {2309.11913},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.11913},
}
Figure