SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
SegFormer: простая и эффективная архитектура для семантической сегментации с использованием трансформеров
2021-05-31
SCID: 54.1/y94ty5dn
Discuss with AI
ADE20K; Cityscapes mIoU evaluationMLP decoderSegFormerhierarchically structured Transformer encodermultiscale features
Figures from the paper
Abstract (AI)
We present SegFormer, a simple, efficient yet powerful semantic segmentation framework which unifies Transformers with lightweight multilayer perception (MLP) decoders. SegFormer has two appealing features: 1) SegFormer comprises a novel hierarchically structured Transformer encoder which outputs multiscale features. It does not need positional encoding, thereby avoiding the interpolation of positional codes which leads to decreased performance when the testing resolution differs from training. 2) SegFormer avoids complex decoders. The proposed MLP decoder aggregates information from different layers, and thus combining both local attention and global attention to render powerful representations. We show that this simple and lightweight design is the key to efficient segmentation on Transformers. We scale our approach up to obtain a series of models from SegFormer-B0 to SegFormer-B5, reaching significantly better performance and efficiency than previous counterparts. For example, SegFormer-B4 achieves 50.3% mIoU on ADE20K with 64M parameters, being 5x smaller and 2.2% better than the previous best method. Our best model, SegFormer-B5, achieves 84.0% mIoU on Cityscapes validation set and shows excellent zero-shot robustness on Cityscapes-C. Code will be released at: github.com/NVlabs/SegFormer.
Key Findings
1
Removing positional encoding avoids interpolation-related performance drop when testing resolution differs from training.
2
SegFormer introduces a hierarchically structured Transformer encoder that outputs multiscale features without needing positional encoding.
3
SegFormer uses a simple lightweight MLP decoder that aggregates multi-layer features, combining local and global attention.
4
SegFormer-B4 achieves 50.3% mIoU on ADE20K with 64M parameters, being 5x smaller and 2.2% better than the previous best method.
5
SegFormer-B5 achieves 84.0% mIoU on Cityscapes validation and demonstrates strong zero-shot robustness on Cityscapes-C.
6
The simple encoder-decoder design yields efficient segmentation with superior performance and efficiency compared to prior methods.
Research Object
SegFormer semantic segmentation framework (hierarchical Transformer encoder with lightweight MLP decoder) models
Research Subject
Design effectiveness and efficiency for semantic segmentation, including multiscale feature encoding without positional encoding, MLP decoder aggregation of local and global attention, model scaling (B0–B5), and resulting segmentation performance and robustness (mIoU, parameter count, zero-shot robustness)
Publication Details
Publication Date
2021-05-31
Journal
Publisher
ISSN
Cited by
909
Open access PDF
Access Type
Author Information
Download PDF
Subscribe to digest
References available in scid.ai8
ImageNet classification with deep convolutional neural networks2017
Very Deep Convolutional Networks for Large-Scale Image Recognition2014
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows2021
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale2020
Non-local Neural Networks2018
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions2021
Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers2021
CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification2021