Skip to main content
QUICK REVIEW

[Paper Review] SegViT: Semantic Segmentation with Plain Vision Transformers

Bowen Zhang, Zhi Tian|arXiv (Cornell University)|Oct 12, 2022
Advanced Neural Network ApplicationsComputer Science75 citations
TL;DR

SegViT introduces an Attention-to-Mask (ATM) decoder that leverages plain Vision Transformers for semantic segmentation, achieving state-of-the-art or competitive results with reduced computation via a Shrunk backbone design.

ABSTRACT

We explore the capability of plain Vision Transformers (ViTs) for semantic segmentation and propose the SegVit. Previous ViT-based segmentation networks usually learn a pixel-level representation from the output of the ViT. Differently, we make use of the fundamental component -- attention mechanism, to generate masks for semantic segmentation. Specifically, we propose the Attention-to-Mask (ATM) module, in which the similarity maps between a set of learnable class tokens and the spatial feature maps are transferred to the segmentation masks. Experiments show that our proposed SegVit using the ATM module outperforms its counterparts using the plain ViT backbone on the ADE20K dataset and achieves new state-of-the-art performance on COCO-Stuff-10K and PASCAL-Context datasets. Furthermore, to reduce the computational cost of the ViT backbone, we propose query-based down-sampling (QD) and query-based up-sampling (QU) to build a Shrunk structure. With the proposed Shrunk structure, the model can save up to $40\%$ computations while maintaining competitive performance.

Motivation & Objective

  • Explore the potential of plain Vision Transformers (ViTs) for semantic segmentation.
  • Propose an Attention-to-Mask (ATM) module to derive masks from attention maps.
  • Cascade ATM across ViT layers to fuse multi-layer information for segmentation.
  • Introduce Shrunk backbone (query-based down-sampling and up-sampling) to reduce computation.
  • Demonstrate state-of-the-art or competitive results on ADE20K, COCO-Stuff-10K, and PASCAL-Context.

Proposed method

  • Define class-token queries and use cross-attention with backbone feature maps to produce per-class masks via a Sigmoid of the similarity map.
  • Compute class predictions by applying a linear transform and Softmax to updated class tokens.
  • Fuse ATM outputs from multiple ViT layers to form final segmentation predictions.
  • Introduce Shrunk, a computation-saving variant with query-based down-sampling (QD) and query-based up-sampling (QU) to reduce GFLOPs by up to ~40%.
  • Train with a multi-term loss: L_overall = L_cls + lambda_focal L_IoU + lambda_dice L_dice, supervising both class tokens and masks across layers.

Experimental results

Research questions

  • RQ1Can a plain ViT backbone be effectively used for dense semantic segmentation via an attention-driven mask reasoning approach?
  • RQ2Does exploiting cross-attention similarity maps as masks improve segmentation quality over per-pixel decoding on ViT features?
  • RQ3Can multi-layer ATM cascades and Shrunk backbones reduce computation without sacrificing accuracy for segmentation with ViTs?

Key findings

  • SegViT with ATM achieves 55.2% mIoU on ADE20K (ViT-Large backbone) and 55.1% with Shrunk, achieving competitive performance at reduced cost.
  • On ADE20K, SegViT with ViT-Large outperforms several ViT-based methods and approaches or exceeds state-of-the-art in some settings.
  • SegViT-Shrunk reduces computational cost by about 40% (373.5 GFLOPs vs 637.9 GFLOPs) with only minor performance loss.
  • Multi-layer ATM inputs yield consistent mIoU gains (e.g., using three layers yields up to +1.7% on ADE20K).
  • SegViT demonstrates strong results on Pascal-Context (65.3% mIoU for 60 classes) and COCO-Stuff-10K (50.3% mIoU with ViT-Large).

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.