SegViTv2: Exploring Efficient and Continual Semantic Segmentation with Plain Vision Transformers

Bowen Zhang, Liyang Liu, Minh-Hieu Phan, Zhi Tian, Chunhua Shen, Yifan Liu · DOI

Introduction

Semantic segmentation traditionally relies on hierarchical backbones like ResNet or Swin Transformers. While plain Vision Transformers (ViTs) offer powerful global representations, their high-resolution token mesh leads to significant computational overhead. Furthermore, these models typically suffer from catastrophic forgetting in continual learning scenarios. SegViT v2 addresses these challenges through a lightweight Attention-to-Mask (ATM) decoder and an edge-aware Shrunk++ encoder, enabling both high efficiency and "zero forgetting" capabilities.

Methodology

Attention-to-Mask (ATM) Decoder

The core innovation of SegViT v2 is the ATM decoder. Unlike heavy convolutional decoders, ATM treats segmentation as a query-based task. It utilizes learnable class tokens as queries to attend to spatial feature maps. The resulting cross-attention maps are directly converted into binary masks via a Sigmoid operation. This approach leverages the inherent spatial information in Transformer attention maps, reducing the decoder's computational cost to approximately 5% of traditional alternatives.

Visualization of the ATM mechanism showing the transition from similarity and attention maps to semantic masks for categories like 'Table' and 'Chair'.

Shrunk++ Encoder Structure

To optimize the encoder, the authors introduce Edge-aware Query-based Down-sampling (EQD). An auxiliary head identifies object boundaries, allowing the model to preserve high-resolution tokens at edges while down-sampling homogeneous regions. Query-based Up-sampling (QU) subsequently restores full resolution, reducing total GFLOPs by up to 50% without significant performance loss.

Forget-Free Continual Learning

SegViT v2's architecture naturally supports continual learning. By decoupling mask generation (the "where") from classification (the "what"), the model can incorporate new classes by adding new class tokens and ATM modules. By freezing the backbone and existing decoders, the model physically preserves old knowledge, effectively eliminating catastrophic forgetting.

Experimental Results

The model was evaluated on standard benchmarks including ADE20K, COCO-Stuff-10K, and PASCAL-Context. SegViT-BEiT v2 Large achieved a state-of-the-art 58.0% mIoU on the ADE20K validation set.

Performance comparison of SegViT v2 against other state-of-the-art models on the ADE20K dataset, highlighting the trade-off between mIoU and computational cost (GFLOPs).

As shown in Figure 1, the "Shrunk++" variants significantly reduce computational requirements while maintaining competitive performance. In continual learning benchmarks (e.g., the 100-10 setting on ADE20K), SegViT-CL demonstrated a minimal mIoU drop of only 0.3%, significantly outperforming traditional methods that saw drops exceeding 5.4%.

Conclusion

SegViT v2 demonstrates that plain Vision Transformers can be made highly efficient for dense prediction tasks. By rethinking the decoder as a query-based attention mechanism and optimizing the encoder through edge-aware sampling, the framework achieves state-of-the-art results while providing a robust solution for continual learning without catastrophic forgetting.

Summary updated

BibTeX
@article{zhang2024segvitv,
  author = {Bowen Zhang and Liyang Liu and Minh-Hieu Phan and Zhi Tian and Chunhua Shen and Yifan Liu},
  title = {{SegViTv2: Exploring Efficient and Continual Semantic Segmentation with Plain Vision Transformers}},
  journal = {Int. J. Comput. Vis.},
  year = {2024},
  doi = {10.1007/s11263-023-01894-8},
}
Figure