TransVOS: Video Object Segmentation with Transformers

Jianbiao Mei, Mengmeng Wang, Yeneng Lin, Yong LiuarXiv 2021

TL;DR

This paper introduces TransVOS, a novel transformer-based framework for semi-supervised video object segmentation (VOS). TransVOS effectively models both spatial and temporal relationships within video sequences using a unified transformer architecture and a streamlined two-path feature extractor, achieving state-of-the-art results on benchmark datasets.

What Problem Does This Paper Address?

Semi-supervised video object segmentation (VOS) aims to segment a target object in a video sequence, given its mask in the first frame. A key challenge in VOS is effectively capturing the dependencies between different frames (temporal relationships) and within each frame (spatial relationships). Existing methods, particularly Space-Time Memory (STM) networks, often struggle to fully exploit both types of relationships. They might focus more on temporal dependencies between frames or neglect fine-grained spatial details within a frame. Furthermore, many approaches use separate encoders for reference frames and the current query frame, leading to increased model complexity and redundant parameters. This paper addresses these limitations by proposing a unified framework that leverages transformers to model both spatial and temporal dependencies comprehensively, while also simplifying the model architecture.

Methods

The core of TransVOS is a vision transformer architecture designed to capture spatio-temporal relationships. Unlike previous methods that might use separate encoders for reference and query frames, TransVOS employs a single, unified two-path feature extractor. This extractor adaptively processes RGB frames and their corresponding object masks, significantly reducing model parameters and complexity.

The framework consists of:

  • Feature Extractor: A ResNet-based backbone with a novel two-path input layer that handles both reference sets (history frames with masks) and query frames.
  • Vision Transformer: This component models the spatio-temporal relationships by flattening the extracted features and feeding them into a transformer encoder and decoder. The encoder captures global spatio-temporal dependencies, while the decoder focuses on predicting target object positions.
  • Target Attention Block (TAB): This block fuses the encoder's output and the decoder's output to generate attention maps, which are then concatenated with the query frame's features to enhance target information.
  • Segmentation Head: A refinement module that takes the enhanced features and outputs the final predicted mask.

The paper also proposes a method for multi-object segmentation by using a soft aggregation operation on individual object predictions.

Datasets

TransVOS is trained and evaluated on the following datasets:

  • DAVIS 2016/2017: Standard benchmarks for video object segmentation. DAVIS2016 is a single-object dataset, while DAVIS2017 is a multi-object dataset.
  • YouTube-VOS 2018: A large-scale dataset for video object segmentation, featuring a significant number of objects per video.

The paper also mentions pre-training on synthetic videos generated from static images using data augmentation techniques.

Key Insights and Ideas

  • Unified Spatio-Temporal Modeling: The paper highlights that effectively modeling both spatial relationships within frames and temporal relationships across frames is crucial for robust VOS. Transformers, with their self-attention mechanism, are well-suited for this joint modeling.
  • Streamlined Feature Extraction: The proposed two-path feature extractor is a key innovation. By unifying the processing of reference and query frames, it significantly reduces model complexity and parameters compared to traditional two-encoder pipelines, without sacrificing performance.
  • Transformer Decoder's Importance: The study demonstrates that the transformer decoder plays a vital role in refining predictions and focusing on relevant object features, contributing to improved segmentation accuracy.
  • Reference Set Strategy: The paper investigates different reference set configurations, finding that using just the first frame with ground truth and the immediately preceding frame with its predicted mask is sufficient and effective, challenging the notion that larger memory banks are always better.

Key Results

TransVOS achieves state-of-the-art performance on the DAVIS and YouTube-VOS benchmarks.

  • On DAVIS17-val, TransVOS trained with YouTube-VOS data achieves J&F scores of 83.9%, outperforming other methods.
  • When trained solely on DAVIS, it still achieves competitive results, surpassing methods like FEELVOS and AGAME.
  • On YouTube-VOS 2018 validation, TransVOS achieves an overall score of 81.8%, outperforming STM and KMN.
  • The two-path feature extractor offers a significant parameter reduction (around 20%) compared to independent encoders while achieving higher performance.
  • The model achieves a good balance between accuracy and speed, with FPS around 6.6 on DAVIS17 validation set.

Limitations and Future Work

  • Input Resolution: While the paper shows that higher input resolution (480p vs. 240p) improves performance, it also increases computational cost. The authors chose 480p for comparison with state-of-the-art methods.
  • Pre-training: While TransVOS can learn effectively with limited training data, pre-training on synthetic data further enhances its robustness and performance. The paper suggests that exploring more effective pre-training strategies could be a future direction.
  • Transformer Decoder Necessity: While the paper shows the decoder provides a 1.2% J&F improvement, future work could explore more efficient decoder architectures or alternative ways to leverage the transformer's full potential.
  • Multi-Object Segmentation: While a method for multi-object segmentation is proposed, its effectiveness and potential for further improvement are not deeply explored.

Summary updated

BibTeX
@misc{mei2021transvos,
  author = {Jianbiao Mei and Mengmeng Wang and Yeneng Lin and Yong Liu},
  title = {{TransVOS: Video Object Segmentation with Transformers}},
  year = {2021},
  eprint = {2106.00588},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.00588},
}
Figure