EfficientFormer: Vision Transformers at MobileNet Speed

要約

ビジョントランスフォーマー(ViT)は、コンピュータービジョンタスクの急速な進歩を示しており、さまざまなベンチマークで有望な結果を達成しています。
ただし、膨大な数のパラメーターとモデル設計(注意メカニズムなど)により、ViTベースのモデルは一般に軽量の畳み込みネットワークよりも低速になります。
したがって、リアルタイムアプリケーションへのViTの展開は、特にモバイルデバイスなどのリソースに制約のあるハードウェアでは特に困難です。
最近の取り組みでは、ネットワークアーキテクチャ検索またはMobileNetブロックを使用したハイブリッド設計を通じて、ViTの計算の複雑さを軽減しようとしていますが、推論速度はまだ不十分です。
これは重要な質問につながります:変圧器は高性能を得ながらMobileNetと同じくらい速く動くことができますか?
これに答えるために、まず、ViTベースのモデルで使用されているネットワークアーキテクチャとオペレーターを再検討し、非効率的な設計を特定します。
次に、設計パラダイムとして、寸法が一貫した純粋な変圧器(MobileNetブロックなし)を紹介します。
最後に、レイテンシー主導のスリミングを実行して、EfficientFormerと呼ばれる一連の最終モデルを取得します。
広範な実験により、モバイルデバイスのパフォーマンスと速度におけるEfficientFormerの優位性が示されています。
私たちの最速モデルであるEfficientFormer-L1は、ImageNet-1Kで79.2%のトップ1精度を達成し、iPhone 12(CoreMLでコンパイル)ではわずか1.6ミリ秒の推論レイテンシーで、MobileNetV2(1.7ミリ秒、71.8%トップ-
1)、そして私たちの最大のモデルであるEfficientFormer-L7は、わずか7.0ミリ秒の遅延で83.3%の精度を実現します。
私たちの仕事は、適切に設計された変圧器が、高性能を維持しながら、モバイルデバイスで非常に低い遅延に到達できることを証明しています

要約(オリジナル)

Vision Transformers (ViT) have shown rapid progress in computer vision tasks, achieving promising results on various benchmarks. However, due to the massive number of parameters and model design, e.g., attention mechanism, ViT-based models are generally times slower than lightweight convolutional networks. Therefore, the deployment of ViT for real-time applications is particularly challenging, especially on resource-constrained hardware such as mobile devices. Recent efforts try to reduce the computation complexity of ViT through network architecture search or hybrid design with MobileNet block, yet the inference speed is still unsatisfactory. This leads to an important question: can transformers run as fast as MobileNet while obtaining high performance? To answer this, we first revisit the network architecture and operators used in ViT-based models and identify inefficient designs. Then we introduce a dimension-consistent pure transformer (without MobileNet blocks) as design paradigm. Finally, we perform latency-driven slimming to get a series of final models dubbed EfficientFormer. Extensive experiments show the superiority of EfficientFormer in performance and speed on mobile devices. Our fastest model, EfficientFormer-L1, achieves 79.2% top-1 accuracy on ImageNet-1K with only 1.6 ms inference latency on iPhone 12 (compiled with CoreML), which is even a bit faster than MobileNetV2 (1.7 ms, 71.8% top-1), and our largest model, EfficientFormer-L7, obtains 83.3% accuracy with only 7.0 ms latency. Our work proves that properly designed transformers can reach extremely low latency on mobile devices while maintaining high performance

arxiv情報

著者 Yanyu Li,Geng Yuan,Yang Wen,Eric Hu,Georgios Evangelidis,Sergey Tulyakov,Yanzhi Wang,Jian Ren
発行日 2022-06-02 17:51:03+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CV パーマリンク