arXiv reaDer
EfficientFormer:MobileNetSpeedのビジョントランスフォーマー
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.4(1.6ミリ秒、74.7%トップ- 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 a 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 runs as fast as MobileNetV2×1.4 (1.6 ms, 74.7% 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.
updated: Tue Jul 05 2022 14:50:23 GMT+0000 (UTC)
published: Thu Jun 02 2022 17:51:03 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト