Skip to main content
QUICK REVIEW

[Paper Review] SeaFormer++: Squeeze-enhanced Axial Transformer for Mobile Visual Recognition

Qiang Wan, Zilong Huang|arXiv (Cornell University)|Jan 30, 2023
Advanced Neural Network ApplicationsComputer Science82 citations
TL;DR

SeaFormer++ introduces squeeze-enhanced Axial Transformer blocks to build mobile-friendly backbones for semantic segmentation and image classification, achieving state-of-the-art accuracy with low latency on ARM devices.

ABSTRACT

Since the introduction of Vision Transformers, the landscape of many computer vision tasks (e.g., semantic segmentation), which has been overwhelmingly dominated by CNNs, recently has significantly revolutionized. However, the computational cost and memory requirement renders these methods unsuitable on the mobile device. In this paper, we introduce a new method squeeze-enhanced Axial Transformer (SeaFormer) for mobile visual recognition. Specifically, we design a generic attention block characterized by the formulation of squeeze Axial and detail enhancement. It can be further used to create a family of backbone architectures with superior cost-effectiveness. Coupled with a light segmentation head, we achieve the best trade-off between segmentation accuracy and latency on the ARM-based mobile devices on the ADE20K, Cityscapes, Pascal Context and COCO-Stuff datasets. Critically, we beat both the mobilefriendly rivals and Transformer-based counterparts with better performance and lower latency without bells and whistles. Furthermore, we incorporate a feature upsampling-based multi-resolution distillation technique, further reducing the inference latency of the proposed framework. Beyond semantic segmentation, we further apply the proposed SeaFormer architecture to image classification and object detection problems, demonstrating the potential of serving as a versatile mobile-friendly backbone. Our code and models are made publicly available at https://github.com/fudan-zvg/SeaFormer.

Motivation & Objective

  • Motivate the need for accurate per-pixel segmentation on mobile devices with limited compute.
  • Propose a lightweight Transformer-based backbone that reduces global attention cost on high-resolution inputs.
  • Design SEA attention to combine global semantic extraction with local detail enhancement.
  • Build a family of SeaFormer backbones and a lightweight segmentation head to optimize accuracy-latency trade-offs.
  • Demonstrate versatility by applying SeaFormer to image classification beyond segmentation.

Proposed method

  • Introduce squeeze-enhanced Axial attention (SEA attention) that performs horizontal and vertical squeezes to reduce complexity to O(HW).
  • Combine squeeze Axial attention with a detail enhancement convolution path to recover local detail information.
  • Incorporate squeeze axial position embeddings to inject positional information.
  • Use a two-branch architecture (context and spatial) with a fusion block to inject high-level semantics into high-resolution spatial features.
  • Attach a lightweight segmentation head for fast mobile inference.
  • Provide four SeaFormer variants (Tiny, Small, Base, Large) and demonstrate results on ADE20K and Cityscapes, plus ImageNet-1K classification.
Figure 1: Left : Latency comparison with Transformer Vaswani et al. ( 2017 ) , MixFormer Chen et al. ( 2022a ) , ACmix Pan et al. ( 2022b ) , Axial attention Ho et al. ( 2019 ) and local attention Luong et al. ( 2015 ) . It is measured with a single module of channel dimension 64 on a Qualcomm Snapd
Figure 1: Left : Latency comparison with Transformer Vaswani et al. ( 2017 ) , MixFormer Chen et al. ( 2022a ) , ACmix Pan et al. ( 2022b ) , Axial attention Ho et al. ( 2019 ) and local attention Luong et al. ( 2015 ) . It is measured with a single module of channel dimension 64 on a Qualcomm Snapd

Experimental results

Research questions

  • RQ1How can self-attention be made mobile-friendly for high-resolution segmentation without sacrificing accuracy?
  • RQ2Can a two-branch (context and spatial) mobile backbone achieve competitive mIoU with lower latency on ARM devices?
  • RQ3Does combining global squeeze Axial information with local detail enhancement outperform traditional attention and other efficient backbones?
  • RQ4Is SeaFormer versatile enough to perform well on image classification as a backbone, not just segmentation?

Key findings

  • SeaFormer variants achieve superior accuracy-latency trade-offs on ADE20K and Cityscapes compared to mobile-friendly rivals and Transformer-based baselines.
  • SeaFormer-B and SeaFormer-L achieve higher mIoU with lower or comparable latency than MobileNetV3 and other lightweight backbones (e.g., SeaFormer-B: 40.2 mIoU with 106 ms latency; SeaFormer-L: 42.7 mIoU with 367 ms latency).
  • SeaFormer-S* reaches 39.4 ± 0.25 mIoU with 67 ms latency, and SeaFormer-L* reaches 43.7 ± 0.36 mIoU with 367 ms latency, demonstrating strong accuracy at mobile-scale latencies.
  • Ablation shows that combining detail enhancement with squeeze Axial attention yields meaningful gains over either component alone.
  • SeaFormer-T provides competitive results with a lightweight head and low latency (40 ms region) on mobile hardware.
Figure 2: The overall architecture of SeaFormer. It contains shared STEM, context branch ( red ), spatial branch ( blue ), fusion block and light segmentation head. MV2 block means MobileNetV2 block and MV2 $\downarrow$ 2 means MobileNetV2 block with downsampling. SeaFormer layers and fusion block w
Figure 2: The overall architecture of SeaFormer. It contains shared STEM, context branch ( red ), spatial branch ( blue ), fusion block and light segmentation head. MV2 block means MobileNetV2 block and MV2 $\downarrow$ 2 means MobileNetV2 block with downsampling. SeaFormer layers and fusion block w

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.