---
title: SAM
canonical_url: "https://www.modelscope.cn/models/PAI/SAM"
md_url: "https://www.modelscope.cn/models/PAI/SAM.md"
repository: PAI/SAM
last_updated: 2023-09-21
license: "Apache License 2.0"
pipeline_tag: semantic-segmentation
tasks:
  - semantic-segmentation
library_name:
  - pytorch
frameworks:
  - Pytorch
downloads: 466
stars: 13
---

# SAM

> SAM - PAI 在 ModelScope 开源的模型。SAM是Meta 提出的分割一切模型（Segment Anything Model，SAM）突破了分割界限，极大地促进了计算机视觉基础模型的发展。

PAI/SAM 是 ModelScope 魔搭社区上的semantic-segmentation模型，采用 Apache License 2.0 许可。

- **Repository**: PAI/SAM
- **License**: Apache License 2.0
- **Tasks**: semantic-segmentation
- **Downloads**: 466
- **Stars**: 13
- **Last updated**: 2023-09-21

Source: https://www.modelscope.cn/models/PAI/SAM

---

## SAM

![SAM design](./assets/model_diagram.png)

**SAM**  产生高质量的对象蒙版从输入提示，如点或框，它可以用来为图像中的所有对象生成蒙版。它已经在1100万张图像和11亿个掩模的[数据集](https://segment-anything.com/dataset/index.html)上进行了训练，并且在各种分割任务上具有很强的零射击性能。 

<p float="left">
  <img src="./assets/masks1.png" width="37.25%" />
  <img src="./assets/masks2.jpg" width="61.5%" /> 
</p>

有关输出例子如下
<p float="left">
  <img src="./assets/notebook1.png" width="49.1%" />
  <img src="./assets/notebook2.png" width="48.9%" />
</p>

## 引用
如果您在研究中使用SAM或SA-1B，请使用以下BibTeX条目  
```
@article{kirillov2023segany,
  title={Segment Anything},
  author={Kirillov, Alexander and Mintun, Eric and Ravi, Nikhila and Mao, Hanzi and Rolland, Chloe and Gustafson, Laura and Xiao, Tete and Whitehead, Spencer and Berg, Alexander C. and Lo, Wan-Yen and Doll{\'a}r, Piotr and Girshick, Ross},
  journal={arXiv:2304.02643},
  year={2023}
}
```
