Skip to main content
QUICK REVIEW

[Paper Review] VMFormer: End-to-End Video Matting with Transformer

Jiachen Li, Vidit Goel|arXiv (Cornell University)|Aug 26, 2022
Image Enhancement TechniquesComputer Science8 citations
TL;DR

VMFormer proposes an end-to-end, trimap-free video matting method based on a vision transformer, using learnable queries and cross-attention to model global image and long-range temporal dependencies. It achieves state-of-the-art performance on composited benchmarks with real-time inference speed, outperforming prior CNN-based methods.

ABSTRACT

Video matting aims to predict the alpha mattes for each frame from a given input video sequence. Recent solutions to video matting have been dominated by deep convolutional neural networks (CNN) for the past few years, which have become the de-facto standard for both academia and industry. However, they have inbuilt inductive bias of locality and do not capture global characteristics of an image due to the CNN-based architectures. They also lack long-range temporal modeling considering computational costs when dealing with feature maps of multiple frames. In this paper, we propose VMFormer: a transformer-based end-to-end method for video matting. It makes predictions on alpha mattes of each frame from learnable queries given a video input sequence. Specifically, it leverages self-attention layers to build global integration of feature sequences with short-range temporal modeling on successive frames. We further apply queries to learn global representations through cross-attention in the transformer decoder with long-range temporal modeling upon all queries. In the prediction stage, both queries and corresponding feature maps are used to make the final prediction of alpha matte. Experiments show that VMFormer outperforms previous CNN-based video matting methods on the composited benchmarks. To our best knowledge, it is the first end-to-end video matting solution built upon a full vision transformer with predictions on the learnable queries. The project is open-sourced at https://chrisjuniorli.github.io/project/VMFormer/

Motivation & Objective

  • To address the limitations of CNN-based video matting models, which suffer from local inductive bias and poor long-range modeling.
  • To develop an end-to-end video matting framework that leverages self- and cross-attention mechanisms for global feature integration.
  • To enable robust long-range temporal modeling without excessive computational cost by using query-based temporal modeling.
  • To achieve real-time inference while maintaining high accuracy on challenging video matting benchmarks.
  • To eliminate the need for expensive trimap annotations by designing a trimap-free, end-to-end solution.

Proposed method

  • VMFormer uses a dual-branch architecture: a feature modeling branch with a CNN backbone and transformer encoder for global feature extraction, and a query modeling branch with a transformer decoder for alpha matte prediction.
  • Self-attention in the encoder enables global integration of features across each frame’s spatial dimensions.
  • Cross-attention in the decoder connects learnable queries with global feature sequences to generate frame-specific predictions.
  • Short-range feature-based temporal modeling (SFTM) uses recurrent aggregation of successive feature maps to enhance local temporal consistency.
  • Long-range query-based temporal modeling (LQTM) learns attention weights across queries to model long-range temporal dependencies efficiently.
  • Final alpha matte predictions are generated via matrix multiplication between queries and corresponding feature maps for each frame.

Experimental results

Research questions

  • RQ1Can a vision transformer-based architecture outperform CNN-based models in end-to-end video matting by capturing global spatial and long-range temporal dependencies?
  • RQ2How can learnable queries and cross-attention be effectively used to generate accurate alpha mattes without trimap supervision?
  • RQ3Can temporal modeling be efficiently implemented at the query level rather than on full feature maps to reduce computational cost?
  • RQ4Does the proposed LQTM module enable better long-range temporal consistency compared to feature-based or post-processing temporal methods?
  • RQ5Can a pure transformer-based video matting model achieve real-time inference while maintaining state-of-the-art accuracy?

Key findings

  • VMFormer achieves the best performance on the composited test set from VideoMatte240K, BG20K, and DVM, with 4.91 MAD, 0.55 MSE, 0.40 Grad, and 0.25 Conn at 512×288 resolution.
  • On high-resolution inputs (1920×1080), VMFormer achieves 4.81 MAD, 0.78 MSE, 4.90 Grad, and 3.34 Conn, outperforming all CNN-based baselines.
  • On the RVM test set, VMFormer surpasses all compared models—including those jointly trained on segmentation data—without additional pre-training.
  • The model maintains real-time inference speed, achieving comparable FPS to CNN-based models on a single A6000 GPU at 512×288 resolution.
  • Visualization results show VMFormer produces higher-quality feature maps with better foreground-background distinction, especially in ambiguous or color-obscured regions.
  • Ablation studies confirm that recurrent aggregation in SFTM and additive attention in LQTM yield the best performance with lower computational cost.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.