
SETR_Naive
Segmentation176 ops217.9K params
A pure transformer encoder that segments images as patch sequences, with three decoder designs.
Segmentation · 201 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
menagerie.classics.setr_vit_seg:build_setr_mla: build({}) SETR-MLA aggregates features from several transformer layers in parallel streams, in the spirit of a feature pyramid network.
About this model's family
SETR, the SEgmentation TRansformer, treats semantic segmentation as a sequence-to-sequence prediction problem. A pure transformer, with no convolution and no resolution reduction, encodes the image as a sequence of patches. This encoder is then combined with a simple decoder to make the segmentation model. The point is to drop the fully convolutional encoder-decoder design, in which spatial resolution shrinks layer by layer: here there is no downsampling, and global context is modeled at every layer of the encoder.
The image is split into fixed-size patches, each linearly embedded, given a position embedding and fed to a standard Transformer encoder. The paper introduces three decoders of increasing complexity, and all three are captured here: SETR-Naive, SETR-PUP and SETR-MLA. The naive decoder projects the transformer output to the number of categories with two 1 by 1 convolutions and bilinearly upsamples it to full resolution in one step. Progressive upsampling alternates convolutions with 2x upsampling, taking four steps to reach full resolution. Multi-level aggregation fuses features from several transformer layers in the spirit of a feature pyramid network.
The captured members emit 19-channel maps, the category count the paper uses for Cityscapes. SETR reached 50.28% mIoU on ADE20K and 55.83% on Pascal Context, and took first position on the ADE20K test server leaderboard on the day of submission.
Key idea. Reformulating semantic segmentation as sequence-to-sequence learning with a pure transformer encoder that keeps full spatial resolution, as an alternative to the encoder-decoder FCN design.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{zheng2021rethinkingsemanticsegmentationsequencetosequence,
title={Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers},
author={Sixiao Zheng and Jiachen Lu and Hengshuang Zhao and Xiatian Zhu and Zekun Luo and Yabiao Wang and Yanwei Fu and Jianfeng Feng and Tao Xiang and Philip H. S. Torr and Li Zhang},
year={2021},
eprint={2012.15840},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2012.15840},
}