[Paper Review] Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers
Proposes SETR, a pure transformer encoder that treats images as patch sequences for semantic segmentation, achieving state-of-the-art on ADE20K and Pascal Context and competitive Cityscapes results.
Most recent semantic segmentation methods adopt a fully-convolutional network (FCN) with an encoder-decoder architecture. The encoder progressively reduces the spatial resolution and learns more abstract/semantic visual concepts with larger receptive fields. Since context modeling is critical for segmentation, the latest efforts have been focused on increasing the receptive field, through either dilated/atrous convolutions or inserting attention modules. However, the encoder-decoder based FCN architecture remains unchanged. In this paper, we aim to provide an alternative perspective by treating semantic segmentation as a sequence-to-sequence prediction task. Specifically, we deploy a pure transformer (ie, without convolution and resolution reduction) to encode an image as a sequence of patches. With the global context modeled in every layer of the transformer, this encoder can be combined with a simple decoder to provide a powerful segmentation model, termed SEgmentation TRansformer (SETR). Extensive experiments show that SETR achieves new state of the art on ADE20K (50.28% mIoU), Pascal Context (55.83% mIoU) and competitive results on Cityscapes. Particularly, we achieve the first position in the highly competitive ADE20K test server leaderboard on the day of submission.
Motivation & Objective
- Revisit semantic segmentation beyond encoder-decoder FCN architectures.
- Introduce a pure transformer encoder that avoids downsampling in spatial resolution.
- Explore decoder designs to recover full-resolution segmentation from transformer features.
- Demonstrate that global self-attention across image patches yields superior feature representations.
Proposed method
- Split images into fixed-size patches and linearly embed them into a 1D sequence.
- Use a pure Transformer encoder with global self-attention to learn patch-level features.
- Add spatial information via learnable patch position embeddings.
- Experiment with three decoder designs: naive upsampling, progressive upsampling (PUP), and multi-level feature aggregation (MLA).
- Pre-train transformer backbones with ViT/DeiT where applicable and integrate auxiliary losses at intermediate Transformer layers.

Experimental results
Research questions
- RQ1Can a pure Transformer encoder operating on image patches replace convolutional encoders for semantic segmentation?
- RQ2How do different decoder designs impact pixel-level segmentation when using a Transformer-based encoder?
- RQ3What are the effects of pre-training strategies (ViT/DeiT) on SETR performance across standard segmentation benchmarks?
Key findings
- SETR achieves state-of-the-art on ADE20K (50.28% mIoU with MS inference) and Pascal Context (55.83% mIoU with MS inference).
- SETR demonstrates competitive results on Cityscapes, with SETR-PUP surpassing many FCN-based and attention-augmented baselines.
- Pre-training the Transformer encoder (ViT/DeiT) significantly boosts performance, outperforming randomly initialized variants.
- The three decoder designs show varying trade-offs, with progressive upsampling (SETR-PUP) generally delivering the best balance of accuracy and complexity.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.