Papers › RepViT: Revisiting Mobile CNN From ViT Perspective

RepViT: Revisiting Mobile CNN From ViT Perspective

18 Jul 2023CVPR 2024 1arXiv:2307.09283archive 2025-07-28

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

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× faster inference than the advanced MobileSAM. Codes and models are available at \url{https://github.com/THU-MIG/RepViT}.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.09283")

Code

Syntology Ran 2 of 12 code samples harvested from 2 repositories linked to this paper; 10 have no recorded run. Of those that ran: 2 ran · fixture could not drive it.

By repository: named in the paper: 6 samples from 1 repository, 2 ran; community (archive-listed): 6 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

THU-MIG/RepViT mentioned in papermentioned on GitHubpytorchApache-2.0 report
jameslahm/RepViT mentioned in papermentioned on GitHubpytorchApache-2.0 report
rwightman/pytorch-image-models mentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 2 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · fixture could not drive it
10unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_rel_pos THU-MIG/RepViT/sam/repvit_sam/modeling/image_encoder.py named in the paper ran · fixture could not drive it Apache-2.0 (permissive) · 733d7f0bedcb74c2 · report
window_partition THU-MIG/RepViT/sam/repvit_sam/modeling/image_encoder.py named in the paper ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 105fa08885dc36cc · report
build_sam_vit_b THU-MIG/RepViT/sam/repvit_sam/build_sam.py named in the paper unverified Apache-2.0 (permissive) · f9bc5f31ce61cee8 · report
build_sam_vit_h THU-MIG/RepViT/sam/repvit_sam/build_sam.py named in the paper unverified Apache-2.0 (permissive) · 6b77c1f11fff3ed6 · report
build_sam_vit_l THU-MIG/RepViT/sam/repvit_sam/build_sam.py named in the paper unverified Apache-2.0 (permissive) · 3f8890e695469246 · report
window_unpartition THU-MIG/RepViT/sam/repvit_sam/modeling/image_encoder.py named in the paper unverified Apache-2.0 (permissive) · 27be441cc8213e52 · report
align_input_shape_by_image_data_format leondgarse/keras_cv_attention_models/keras_cv_attention_models/backend.py community (archive-listed) unverified MIT (permissive) · 37f61ffdf6057577 · report
get_plot_cols_rows leondgarse/keras_cv_attention_models/keras_cv_attention_models/plot_func.py community (archive-listed) unverified MIT (permissive) · e16a66a2573bda6b · report
in_train_phase leondgarse/keras_cv_attention_models/keras_cv_attention_models/backend.py community (archive-listed) unverified MIT (permissive) · 0bf53c29bb7ba1f9 · report
numpy_image_resize leondgarse/keras_cv_attention_models/keras_cv_attention_models/backend.py community (archive-listed) unverified MIT (permissive) · e461556a7330926c · report
put_text_on_image leondgarse/keras_cv_attention_models/keras_cv_attention_models/plot_func.py community (archive-listed) unverified MIT (permissive) · 9044d73cb7a0bb47 · report
stack_and_plot_images leondgarse/keras_cv_attention_models/keras_cv_attention_models/plot_func.py community (archive-listed) unverified MIT (permissive) · 03d4c554098904fd · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

1x1 ConvolutionAverage PoolingBatch NormalizationConvolutionDense ConnectionsDepthwise ConvolutionDepthwise Separable ConvolutionDropoutGlobal Average PoolingHard SwishInverted Residual BlockPointwise ConvolutionReLUReLU6SAMSigmoid ActivationSqueeze-and-Excitation Block

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections