---
title: RepViTSAM
canonical_url: "https://www.modelscope.cn/models/tany0699/RepViTSAM"
md_url: "https://www.modelscope.cn/models/tany0699/RepViTSAM.md"
repository: tany0699/RepViTSAM
chinese_name: "RepViTSAM端侧实时SAM"
last_updated: 2023-12-13
license: "Apache License 2.0"
pipeline_tag: image-segmentation
tasks:
  - image-segmentation
model_type:
  - Hybrid
library_name:
  - pytorch
frameworks:
  - pytorch
language:
  - zh
domain:
  - cv
downloads: 39
stars: 2
tags:
  - segmentation
  - SAM
  - RepViTSAM
  - "端侧"
  - "高效"
  - "轻量化"
  - "分割一切"
---

# RepViTSAM

> RepViTSAM - tany0699 在 ModelScope 开源的模型。EfficientSAM &nbsp Paper &nbsp｜ &nbsp GitHub &nbsp

tany0699/RepViTSAM 是 ModelScope 魔搭社区上的image-segmentation模型，采用 Apache License 2.0 许可。

- **Repository**: tany0699/RepViTSAM
- **License**: Apache License 2.0
- **Tasks**: image-segmentation
- **Tags**: segmentation, SAM, RepViTSAM, 端侧, 高效, 轻量化, 分割一切
- **Downloads**: 39
- **Stars**: 2
- **Last updated**: 2023-12-13

Source: https://www.modelscope.cn/models/tany0699/RepViTSAM

---

# EfficientSAM
<p align="center">
         &nbsp<a href="https://arxiv.org/pdf/2312.05760.pdf">Paper</a>&nbsp｜
         &nbsp<a href="https://github.com/THU-MIG/RepViT">GitHub </a>&nbsp
</p>

RepViT-SAM: Towards Real-Time Segmenting Anything.  
分段任意模型(SAM)最近在各种计算机视觉任务中表现出了令人印象深刻的零射击转移性能。然而，其沉重的计算成本仍然令人望而生畏的实际应用。MobileSAM建议使用蒸馏技术将SAM中的重量级图像编码器替换为TinyViT，从而大大减少了计算需求。然而，由于自注意机制带来的大量内存和计算开销，其在资源受限的移动设备上的部署仍然面临挑战。最近，RepViT通过将高效的vit架构设计融入cnn，在移动设备上实现了最先进的性能和延迟权衡。这里，为了在移动设备上实现实时分割，在MobileSAM之后，我们用RepViT模型替换了SAM中的重量级图像编码器，最终得到了RepViT-SAM模型。大量实验表明，repviti - sam具有比MobileSAM更好的零射击传输能力，并且推理速度快近10倍。

<p align="center">
<img src="./RepViT.jpg" width="640" height="488" alt="Comparative analysis of FastSAM and SAM"/>
</p>


## 期望模型使用方式以及适用范围
本模型适用范围较广，能对图片中包含的大部分感兴趣物体（COCO things 80类）根据提示(点、框、文本)进行分割。

### 如何使用
在ModelScope框架上，提供输入图片，即可通过简单的Pipeline调用来使用。

#### 代码范例
即将上线

#### Clone with HTTP
```bash
  git clone https://www.modelscope.cn/tany0699/RepViTSAM.git
```

## 引用
如果该模型对你有所帮助，请引用相关的论文：
```
 @article{Wang_Chen_Lin_Han_Ding_2023,  
 title={RepViT-SAM: Towards Real-Time Segmenting Anything}, 
 author={Wang, Ao and Chen, Hui and Lin, Zijia and Han, Jungong and Ding, Guiguang}, 
 year={2023}, 
 month={Dec}, 
 language={en-US} 
 }
```
