Visual Saliency Transformer

Nian Liu, Ni Zhang, Kaiyuan Wan, Ling Shao, Junwei HanICCV 2021

Abstract

Existing state-of-the-art saliency detection methods heavily rely on CNN-based architectures. Alternatively, we rethink this task from a convolution-free sequence-to-sequence perspective and predict saliency by modeling long-range dependencies, which can not be achieved by convolution. Specifically, we develop a novel unified model based on a pure transformer, namely, Visual Saliency Transformer (VST), for both RGB and RGB-D salient object detection (SOD). It takes image patches as inputs and leverages the transformer to propagate global contexts among image patches. Unlike conventional architectures used in Vision Transformer (ViT), we leverage multi-level token fusion and propose a new token upsampling method under the transformer framework to get high-resolution detection results. We also develop a token-based multi-task decoder to simultaneously perform saliency and boundary detection by introducing task-related tokens and a novel patch-task-attention mechanism. Experimental results show that our model outperforms existing methods on both RGB and RGB-D SOD benchmark datasets. Most importantly, our whole framework not only provides a new perspective for the SOD field but also shows a new paradigm for transformer-based dense prediction models.

Introduction

Salient Object Detection (SOD) aims to identify the most visually prominent objects in a scene. While Convolutional Neural Networks (CNNs) have dominated this field for years, their inherent local receptive fields limit their ability to model global, long-range dependencies—a critical factor in understanding complex scenes. The Visual Saliency Transformer (VST) addresses this by rethinking SOD as a pure sequence-to-sequence problem, moving away from convolution entirely to leverage the global modeling power of Transformers.

Architecture and Methodology

VST introduces a unified, pure transformer framework designed for both RGB and RGB-D salient object detection. The architecture is divided into three primary components:

  1. Transformer Encoder: Utilizing a Tokens-to-Token (T2T) approach, the encoder divides images into patches and iteratively aggregates neighboring tokens. This allows the model to capture local structures while maintaining a global context through self-attention mechanisms.
  2. Transformer Convertor: For multi-modal (RGB-D) data, a Cross Modality Transformer (CMT) is employed. It uses cross-attention to facilitate interaction between RGB and depth features, ensuring effective fusion of appearance and spatial information.
  3. Multi-task Transformer Decoder: The decoder introduces a novel Reverse Tokens-to-Token (RT2T) upsampling method, which reconstructs high-resolution maps without relying on traditional convolutions. It also employs task-specific "saliency" and "boundary" tokens that interact with image patches via patch-task-attention.
The overall architecture of the Visual Saliency Transformer (VST), illustrating the flow from image patches through the encoder, convertor, and multi-task decoder.

Experimental Evaluation

The VST model was rigorously tested across 15 benchmark datasets, including 6 RGB SOD datasets (e.g., DUTS, ECSSD) and 9 RGB-D SOD datasets (e.g., NJUD, NLPR). This extensive evaluation demonstrates the model's robustness and versatility across different modalities and scene complexities.

Key Results

VST consistently outperforms state-of-the-art CNN-based methods across almost all metrics. Quantitatively, it achieved a Structure-measure ($S_m$) of 0.896 on the DUTS-TE dataset and 0.922 on the NJUD dataset. Qualitatively, the model excels at producing sharp object boundaries and remains resilient against cluttered backgrounds that often confuse traditional CNN models.

Qualitative comparison of VST against existing state-of-the-art methods. VST demonstrates superior performance in identifying salient objects with precise boundaries, even in complex scenes.

Conclusion

The Visual Saliency Transformer represents a paradigm shift in dense prediction tasks. By demonstrating that a pure transformer architecture can effectively handle high-resolution upsampling and multi-task learning, VST opens new avenues for applying sequence-to-sequence models to computer vision challenges beyond classification, such as semantic segmentation and depth estimation.

Summary updated

BibTeX
@inproceedings{liu2021visual,
  author = {Nian Liu and Ni Zhang and Kaiyuan Wan and Ling Shao and Junwei Han},
  title = {{Visual Saliency Transformer}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  url = {https://openreview.net/forum?id=61Jrj1Z3Yf},
}
Figure