TL;DR: SeaFormer is a novel Transformer-based architecture designed specifically for high-resolution semantic segmentation on mobile devices. By introducing a "squeeze-enhanced Axial attention" mechanism, it achieves a superior trade-off between accuracy and latency, outperforming both mobile-friendly CNNs and existing efficient Transformers on ARM-based hardware.
The Mobile Segmentation Dilemma
Semantic segmentation—the task of assigning a category label to every single pixel in an image—is computationally expensive. While Vision Transformers (ViTs) have revolutionized this field by capturing "global context" (how distant parts of an image relate to each other), they are notoriously power-hungry and slow.
On mobile devices, this creates a significant bottleneck. Standard Transformers have a computational complexity that grows quadratically with the number of pixels, making them practically unusable for high-resolution images. Previous "efficient" attempts often took shortcuts, such as drastically downsampling the image, which destroys the fine details needed for accurate segmentation. The authors of SeaFormer set out to find a way to keep the global "eyes" of a Transformer while maintaining the "speed" required for a smartphone CPU.
The Core Innovation: Squeeze-Enhanced Axial Attention
The primary breakthrough of the paper is the Squeeze-enhanced Axial (SEA) attention block. It tackles the quadratic complexity problem by breaking the attention mechanism down into three clever steps:
- Squeeze (Global Context): Instead of comparing every pixel to every other pixel, the model "squeezes" (pools) the feature maps along the horizontal and vertical axes. This creates compact row and column summaries.
- Axial Attention: It performs self-attention on these squeezed vectors. This reduces the computational complexity from a staggering $O(H^2W^2)$ to a much more manageable $O(HW)$, where $H$ and $W$ are the image height and width.
- Detail Enhancement (Local Context): Squeezing data inevitably loses fine-grained information. To fix this, the authors add a parallel "Detail Enhancement Kernel"—essentially a light depth-wise convolution—that injects local spatial details back into the mix.
The overall architecture uses a two-branch design: a "context branch" that uses these SEA layers to understand the big picture, and a "spatial branch" that preserves high-resolution features. These are then fused together and fed into a lightweight segmentation head.
Key Insights
- Linear Complexity is King: By achieving $O(HW)$ complexity, SeaFormer ensures that as image resolution increases, the computational cost only grows linearly, not exponentially. This is the "secret sauce" for mobile deployment.
- The Synergy of Conv and Transformer: The paper reinforces the idea that for mobile vision, you shouldn't choose between convolutions and Transformers. Convolutions are great at local details; Transformers are great at global relationships. SeaFormer uses both in a way that plays to their respective strengths.
- Positional Awareness Matters: The authors found that even in a "squeezed" space, adding positional embeddings (helping the model understand where a row or column is located) significantly boosts performance.
Key Results and Performance
SeaFormer sets new records for the accuracy-to-latency ratio on ARM-based mobile CPUs (tested on a Qualcomm Snapdragon 865). The researchers evaluated the model across several standard benchmarks, including ADE20K, Cityscapes, and COCO.
- ADE20K Performance: SeaFormer-Base achieved 41.0 mIoU (mean Intersection over Union) with a latency of only 106ms. For comparison, the popular CNN-based MobileNetV3-Large only hits 33.1 mIoU and is actually slower at 126ms.
- Beating the Rivals: It consistently outperformed other efficient Transformers like TopFormer and SegFormer. For instance, SeaFormer-Tiny is roughly 10% faster than TopFormer-T while providing a +1.4% mIoU boost.
- Qualitative Superiority: Visualizations show that SeaFormer produces much cleaner, more accurate boundaries around objects compared to its predecessors, thanks to the detail enhancement kernel.
Limitations and Future Work
The authors are transparent about the current state of the project. They acknowledge that while the results are strong, the system is not yet "fully trustworthy" for critical real-world deployment (like medical imaging or high-stakes autonomous driving) without further exhaustive testing.
Furthermore, the study focused heavily on ARM-based mobile CPUs. Future work should explore how this architecture performs on mobile GPUs and specialized AI accelerators. Finally, while they touched on classification and detection, more work is needed to see how SeaFormer handles other complex tasks like instance segmentation or video tracking.
Summary updated