<!-- # hard line break macro for HTML -->

<a id="model-zoo-facebook-sam3"></a>

# facebook/sam3

<a href="../../plugins/plugins_ecosystem/sam3_images.html" target="_blank">
    <img src="https://img.shields.io/badge/Plugin-sam3_\_images-orange" alt="From Plugin">
</a>

#### NOTE
This is a [remotely-sourced model](../remote.md#model-zoo-remote) from the
[sam3_images](../../plugins/plugins_ecosystem/sam3_images.html) plugin, maintained by the community.
It is not part of FiftyOne core and may have special installation requirements.
Please review the plugin documentation and license before use.

SAM3 (Segment Anything Model 3) performs promptable segmentation on images using text or visual prompts. Supports concept segmentation (find all instances), visual segmentation (specific instances), automatic segmentation, and visual embeddings..

**Details**

- Model name: `facebook/sam3`
- Model source: [https://huggingface.co/facebook/sam3](https://huggingface.co/facebook/sam3)
- Model author: Meta AI
- Model license: SAM License
- Exposes embeddings? yes
- Tags: `embeddings, torch, zero-shot, segmentation, segment-anything, detections, instance-segmentation, visual-prompting`

**Requirements**

- Packages: `huggingface-hub, transformers, torch, torchvision`
- CPU support
  - yes
- GPU support
  - yes

**Example usage**

```python
import fiftyone as fo
import fiftyone.zoo as foz

foz.register_zoo_model_source("https://github.com/harpreetsahota204/sam3_images")

dataset = foz.load_zoo_dataset(
    "coco-2017",
    split="validation",
    dataset_name=fo.get_default_dataset_name(),
    max_samples=50,
    shuffle=True,
)

model = foz.load_zoo_model("facebook/sam3")

dataset.apply_model(model, label_field="predictions")

session = fo.launch_app(dataset)
```
