EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformers

Junting Pan, Adrian Bulat, Fuwen Tan, Xiatian Zhu, Lukasz Dudziak +3 more
5/6/2022
332 citations
cs.CV
transformer-attention

Official code: saic-fi/edgevit (119 stars, Python, Apache-2.0, last commit 2023-03-14).

Abstract

Self-attention based models such as vision transformers (ViTs) have emerged as a very competitive architecture alternative to convolutional neural networks (CNNs) in computer vision. Despite increasingly stronger variants with ever-higher recognition accuracies, due to the quadratic complexity of self-attention, existing ViTs are typically demanding in computation and model size.

Show full abstract

Although several successful design choices (e.g., the convolutions and hierarchical multi-stage structure) of prior CNNs have been reintroduced into recent ViTs, they are still not sufficient to meet the limited resource requirements of mobile devices. This motivates a very recent attempt to develop light ViTs based on the state-of-the-art MobileNet-v2, but still leaves a performance gap behind. In this work, pushing further along this under-studied direction we introduce EdgeViTs, a new family of light-weight ViTs that, for the first time, enable attention-based vision models to compete with the best light-weight CNNs in the tradeoff between accuracy and on-device efficiency. This is realized by introducing a highly cost-effective local-global-local (LGL) information exchange bottleneck based on optimal integration of self-attention and convolutions. For device-dedicated evaluation, rather than relying on inaccurate proxies like the number of FLOPs or parameters, we adopt a practical approach of focusing directly on on-device latency and, for the first time, energy efficiency. Specifically, we show that our models are Pareto-optimal when both accuracy-latency and accuracy-energy trade-offs are considered, achieving strict dominance over other ViTs in almost all cases and competing with the most efficient CNNs. Code is available at https://github.com/saic-fi/edgevit.

View on arXivView PDF

Code Implementations(1)

saic-fi/edgevitOfficial100%
Apache-2.0

[ECCV 2022] EdgeViT: Competing Light-weight CNNs on Mobile Devices with Vision Transformers

1195PythonJul 20, 20223 years agoApache-2.0

Similar Papers

Cite this paper

@article{pan2022edgevits,
  title  = {EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformers},
  author = {Junting Pan and Adrian Bulat and Fuwen Tan and Xiatian Zhu and Lukasz Dudziak and Hongsheng Li and Georgios Tzimiropoulos and Brais Martinez},
  year   = {2022},
  eprint = {2205.03436},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.03436}
}

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/2205.03436.svg)](https://codeofpaper.com/paper/2205.03436)

Discussion