SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez,, Ping Luo

TL;DR
SegFormer introduces a simple, efficient transformer-based framework for semantic segmentation that unifies hierarchical encoding with lightweight decoders, achieving state-of-the-art results with fewer parameters.
Contribution
It proposes a novel hierarchical Transformer encoder without positional encoding and a lightweight MLP decoder, improving efficiency and performance over previous methods.
Findings
SegFormer-B4 achieves 50.3% mIoU on ADE20K with 64M parameters.
SegFormer-B5 reaches 84.0% mIoU on Cityscapes.
The model is robust in zero-shot scenarios on Cityscapes-C.
Abstract
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,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗jonathandinu/face-parsingmodel· 245k dl· ♡ 212245k dl♡ 212
- 🤗nvidia/mit-b0model· 130k dl· ♡ 38130k dl♡ 38
- 🤗nvidia/mit-b1model· 6.4k dl· ♡ 36.4k dl♡ 3
- 🤗nvidia/mit-b2model· 23k dl· ♡ 523k dl♡ 5
- 🤗nvidia/mit-b3model· 14k dl· ♡ 814k dl♡ 8
- 🤗nvidia/mit-b4model· 5.5k dl· ♡ 15.5k dl♡ 1
- 🤗nvidia/mit-b5model· 7.7k dl· ♡ 137.7k dl♡ 13
- 🤗nvidia/segformer-b0-finetuned-ade-512-512model· 638k dl· ♡ 183638k dl♡ 183
- 🤗nvidia/segformer-b0-finetuned-cityscapes-1024-1024model· 13k dl· ♡ 1013k dl♡ 10
- 🤗nvidia/segformer-b0-finetuned-cityscapes-512-1024model· 16k dl· ♡ 116k dl♡ 1
Videos
Taxonomy
TopicsAdvanced Neural Network Applications · Advanced Image and Video Retrieval Techniques · Video Surveillance and Tracking Methods
MethodsMulti-Head Attention · Attention Is All You Need · Linear Layer · Refunds@Expedia|||How do I get a full refund from Expedia? · Convolution · Mix-FFN · SegFormer · Absolute Position Encodings · Position-Wise Feed-Forward Layer · Label Smoothing
