# THU-MIG/RepViT

RepViT: Revisiting Mobile CNN From ViT Perspective [CVPR 2024] and RepViT-SAM: Towards Real-Time Segmenting Anything

Repository: https://github.com/THU-MIG/RepViT
Canonical: https://ross.abutalabs.com/products/repvit
Homepage: https://arxiv.org/abs/2307.09283
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Last push: 2024-06-14T10:08:26+00:00

## Health v2 (maintenance only)
Score: 19/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 81
- inputs: {"age_days": 1143, "days_push": 810, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1108, forks 83 (observed 2026-08-28T04:03:36.976575+00:00)

## What it is
Official PyTorch implementation of RepViT, a family of lightweight CNNs designed by integrating efficient ViT architectural designs into MobileNetV3, and RepViT-SAM, a real-time Segment Anything variant. It provides pretrained models achieving state-of-the-art accuracy-latency trade-offs on mobile devices, including over 80% ImageNet top-1 accuracy at 1.0 ms latency on iPhone 12.

## Use cases
- run segment anything in real time on mobile devices
- lightweight image classification model for edge deployment
- replace SAM image encoder with a faster CNN backbone
- deploy vision models on iPhone with Core ML
- pretrained lightweight backbone for downstream vision tasks
- compare lightweight CNN vs ViT architectures

## When to choose
- you need SAM-style segmentation with near real-time latency on resource-constrained devices
- you want a lightweight CNN backbone that outperforms lightweight ViTs on mobile latency
- you need pretrained ImageNet models with excellent accuracy-latency trade-offs

## When to avoid
- you need a general-purpose vision framework rather than specific model architectures
- you require transformer-based backbones with self-attention
- your deployment targets are not latency-sensitive or mobile

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, deep-learning, computer-vision, image-processing
- domain: computer-vision, deep-learning, machine-learning, image-processing
- platform: python, cross-platform
- tags: vision-transformer, cnn, segment-anything, mobile-deployment, image-classification, semantic-segmentation, cvpr-2024, pytorch, model-architecture, repvit, gpu

## Member repositories
- THU-MIG/RepViT (main) score 19

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:36.976575+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:43:44.267036+00:00, confidence not recorded.
  - readme: https://github.com/THU-MIG/RepViT (fetched 2026-08-28T04:03:36.976575+00:00, sha 8985df881a03)
  - homepage: https://arxiv.org/abs/2307.09283 (fetched 2026-08-29T12:47:38.685608+00:00, sha c87037143037)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T12:47:38.703661+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T12:47:38.699196+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T12:47:38.706042+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T12:47:38.701882+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
