
repvit_m1
Image classification427 ops5.5M params
8 models, image classification. Fewest parameters first.
RepViT is a family of pure lightweight CNNs for mobile devices, made by taking a standard lightweight CNN, MobileNetV3, and integrating the efficient architectural designs of lightweight Vision Transformers. The question behind it is whether ViT design choices can help CNNs, since lightweight ViTs usually adopt the MetaFormer block structure while lightweight CNNs favour the inverted residual bottleneck. The headline result: on ImageNet, RepViT achieves over 80% top-1 accuracy with 1.0 ms latency on an iPhone 12, which the authors call the first time for a lightweight model, to the best of their knowledge.
The RepViT block separates the token mixer from the channel mixer: the depthwise convolution is moved up, and the optional squeeze-and-excitation layer is placed after it because it depends on spatial information interaction. Structural re-parameterization on the depthwise layer lets the skip connection's computational and memory costs be eliminated at inference, which the paper calls especially advantageous for mobile devices. The channel mixer uses an expansion ratio of 2 in all stages. Width is doubled after each stage, ending at 48, 96, 192 and 384 channels.
At the macro level the stages follow a ratio of 1:1:7:1. All modules prioritize simple 3 by 3 convolutions, since larger kernels are not friendly for mobile devices because of their computation complexity and memory access costs. Squeeze-and-excitation layers are placed cross-block, in the 1st, 3rd, 5th and so on block of each stage, to maximize the accuracy benefit with a minimal latency increment. Eight members are captured in timm, repvit_m0_9 through repvit_m3, adapted from the official implementation at github.com/jameslahm/RepViT.
AI-written summary; not reviewed by a person. Corrections welcome.

Image classification427 ops5.5M params

Image classification404 ops5.5M params

Image classification404 ops7.3M params

Image classification393 ops8.8M params

Image classification372 ops8.8M params

Image classification563 ops10.7M params

Image classification660 ops14.6M params

Image classification852 ops23.7M params