FsaNet: Frequency Self-attention for Semantic Segmentation

Fengyu Zhang, Ashkan Panahi, Guangjun Gao
11/28/2022
cs.CVcs.AI
transformer-attention

Official code: zfy-csu/FsaNet (12 stars, Python, last commit 2023-03-22).

Abstract

Considering the spectral properties of images, we propose a new self-attention mechanism with highly reduced computational complexity, up to a linear rate. To better preserve edges while promoting similarity within objects, we propose individualized processes over different frequency bands.

Show full abstract

In particular, we study a case where the process is merely over low-frequency components. By ablation study, we show that low frequency self-attention can achieve very close or better performance relative to full frequency even without retraining the network. Accordingly, we design and embed novel plug-and-play modules to the head of a CNN network that we refer to as FsaNet. The frequency self-attention 1) requires only a few low frequency coefficients as input, 2) can be mathematically equivalent to spatial domain self-attention with linear structures, 3) simplifies token mapping ($1\times1$ convolution) stage and token mixing stage simultaneously. We show that frequency self-attention requires $87.29\% \sim 90.04\%$ less memory, $96.13\% \sim 98.07\%$ less FLOPs, and $97.56\% \sim 98.18\%$ in run time than the regular self-attention. Compared to other ResNet101-based self-attention networks, \ourM achieves a new \sArt result ($83.0\%$ mIoU) on Cityscape test dataset and competitive results on ADE20k and VOCaug. \ourM can also enhance MASK R-CNN for instance segmentation on COCO. In addition, utilizing the proposed module, Segformer can be boosted on a series of models with different scales, and Segformer-B5 can be improved even without retraining. Code is accessible at \url{https://github.com/zfy-csu/FsaNet

View on arXivView PDF

Code Implementations(1)

zfy-csu/FsaNetOfficial100%
121PythonDec 10, 20213 years ago

Similar Papers

Cite this paper

@article{zhang2022fsanet,
  title  = {FsaNet: Frequency Self-attention for Semantic Segmentation},
  author = {Fengyu Zhang and Ashkan Panahi and Guangjun Gao},
  year   = {2022},
  eprint = {2211.15595},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.15595}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.15595.svg)](https://codeofpaper.com/paper/2211.15595)

Discussion