AFFormer
Lightweight head-free semantic segmentation network with a linear-complexity adaptive frequency filter.
Segmentation · 817 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.
At a glance
- Task
- Segmentation
- Parameters
- 3M
- Operations
- 817
- Framework
- PyTorch
- Recurrent
- No
- Published
- AAAI 2023
- Cited by
- 125 (as of 28 October 2026)
- Authors
- Bo Dong, Pichao Wang, Fan Wang
- Source
- GitHub: dongbo811/AFFormer
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
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.
Details
- Stable ID
- m14514
- Graph hash
- dc1b488516cb6f4af695c2df4cc623090e443ae2a1d01be011582313270c449e
- Skeleton hash
- 0a0fd678f019a3b3af114c2aade195d9cd3eebcfe6f003cee00a6a998e458197
- Architecture hash
- da73692715f980895e442faf7cdd0cb94d1f92dbbd4fa518289df427985edd02
- Diagram SHA-256
- 84e266689aa36c846eb5fd67a29e73a0f0b3bc610ce33287e5a1b96b7687b3d7
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
AFFormer (Adaptive Frequency Transformer) is a lightweight semantic segmentation network built without a decoder head. The paper argues that the computational load of the whole structure has long been ignored, which holds back use on resource-constrained hardware. In place of the decoder, a parallel architecture uses prototype representations as learnable local descriptions and keeps image semantics on high-resolution features.
Pixel embedding and prototype representations use different operators, CNN and Vision Transformer, to save computation. The prototype learning block swaps standard self attention, with O(n^2) complexity, for an adaptive frequency filter with O(n) complexity. The authors motivate the filter by noting that semantic segmentation is very sensitive to frequency information.
The paper reports that its model keeps only 3M parameters. On the ADE20K dataset it reports 41.8 mIoU and 4.6 GFLOPs, which it puts at 4.4 mIoU higher than Segformer with 45% less GFLOPs. On the Cityscapes dataset it reports 78.7 mIoU and 34.4 GFLOPs. The code uses MMSegmentation v0.21.1 as its codebase.
Key idea. AFFormer removes the decoder head from semantic segmentation, using prototype representations in a parallel architecture and an O(n) adaptive frequency filter in place of self attention.
- AFFormer
- Adaptive Frequency Transformer
- head-free semantic segmentation
- lightweight semantic segmentation
- linear transformer
- semantic segmentation
- adaptive frequency filter
- prototype representations
- ADE20K
- Cityscapes
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{dong2023headfreelightweightsemanticsegmentation,
title={Head-Free Lightweight Semantic Segmentation with Linear Transformer},
author={Bo Dong and Pichao Wang and Fan Wang},
year={2023},
eprint={2301.04648},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2301.04648},
}