Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

RepViT: Revisiting Mobile CNN From ViT Perspective

About

Recently, lightweight Vision Transformers (ViTs) demonstrate superior performance and lower latency, compared with lightweight Convolutional Neural Networks (CNNs), on resource-constrained mobile devices. Researchers have discovered many structural connections between lightweight ViTs and lightweight CNNs. However, the notable architectural disparities in the block structure, macro, and micro designs between them have not been adequately examined. In this study, we revisit the efficient design of lightweight CNNs from ViT perspective and emphasize their promising prospect for mobile devices. Specifically, we incrementally enhance the mobile-friendliness of a standard lightweight CNN, \ie, MobileNetV3, by integrating the efficient architectural designs of lightweight ViTs. This ends up with a new family of pure lightweight CNNs, namely RepViT. Extensive experiments show that RepViT outperforms existing state-of-the-art lightweight ViTs and exhibits favorable latency in various vision tasks. Notably, on ImageNet, RepViT achieves over 80\% top-1 accuracy with 1.0 ms latency on an iPhone 12, which is the first time for a lightweight model, to the best of our knowledge. Besides, when RepViT meets SAM, our RepViT-SAM can achieve nearly 10$\times$ faster inference than the advanced MobileSAM. Codes and models are available at \url{https://github.com/THU-MIG/RepViT}.

Ao Wang, Hui Chen, Zijia Lin, Jungong Han, Guiguang Ding• 2023

Related benchmarks

TaskDatasetResultRank
Semantic segmentationADE20K (val)
mIoU43.6
2731
Object DetectionCOCO 2017 (val)--
2454
Image ClassificationImageNet-1K 1.0 (val)
Top-1 Accuracy83.7
1866
Instance SegmentationCOCO 2017 (val)--
1144
Semantic segmentationADE20K
mIoU46.1
936
Fine-grained Image ClassificationCUB200 2011 (test)
Accuracy59.7
536
Object DetectionCOCO 2017
AP (Box)44.6
279
Instance SegmentationCOCO 2017
APm40.8
199
Image ClassificationImageNet-1k 1.0 (test)
Top-1 Acc83.7
72
Boundary DetectionBSDS500
ODS F-score0.764
37
Showing 10 of 21 rows

Other info

Code

Follow for update