> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/plugins/first-party-ango-plugins/sam-3.md).

# SAM 3

## Overview

The One-Click Segmentation plugin allows you to create complex and detailed segmentations of an object starting with one point or one bounding box.

The SAM 3 Plugin uses the Segment Anything Model 3 to automatically generate segmentation masks from input prompts and convert them into segmentation or polygon annotations.

<table data-card-size="large" data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td align="center">SAM 3</td><td data-object-fit="contain"><a href="https://angohub-docs-assets.s3.eu-central-1.amazonaws.com/plugin-icons-banners/One-Click-Seg.png">https://angohub-docs-assets.s3.eu-central-1.amazonaws.com/plugin-icons-banners/One-Click-Seg.png</a></td></tr></tbody></table>

## Plugin Functionality <a href="#plugin-functionality" id="plugin-functionality"></a>

The SAM 3 plugin enables automatic segmentation generation using the Segment Anything Model. It produces high-quality segmentation annotations from a text prompt, dramatically speeding up the annotation process for image and video assets.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FWUovAfmhMDOAIQ6UTytJ%2Fimage.png?alt=media&amp;token=e1af4d2f-c2fb-4a2a-b339-38d30d99065d" alt=""><figcaption></figcaption></figure>

### Supported Data Types <a href="#supported-data-types" id="supported-data-types"></a>

* Image
* Video \[Limited Support]

### Supported Annotation Tools <a href="#supported-annotation-tools" id="supported-annotation-tools"></a>

* Segmentation
* Polygon

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FJx3tYlyMGCYIBeoYBke5%2Fimage.png?alt=media&amp;token=5e2de23d-6510-42e9-afc9-2f16034d3cce" alt=""><figcaption></figcaption></figure>

## Plugin Configuration <a href="#plugin-configuration" id="plugin-configuration"></a>

The **Overwrite** setting in model plugins controls whether existing annotations are replaced or kept. When enabled, the plugin replaces all existing annotations with new model predictions; when disabled, it simply adds the new results without deleting what’s already there.

\
You may vary a number of settings related to the model plugin from the **Config JSON** field. Each option is detailed below:

```json
{
  "prompt": "",
  "threshold": 0.8,
  "polygon_simplification_tolerance": 0.9
}
```

* **"prompt":** Specifies the object, class, or region that should be segmented in the image. The model uses this text prompt to identify and generate segmentation masks for matching objects. Providing a clear and specific prompt typically improves segmentation accuracy.
  * Example:
    * <kbd>"prompt": "red apple"</kbd>
    * <kbd>"prompt": "penguin"</kbd>
* **"threshold":** Sets the confidence threshold for accepting segmentation predictions. Predictions with a confidence score below this value are filtered out.
  * Example:
    * <kbd>"threshold": 0.8</kbd>
* **"polygon\_simplification\_tolerance":** Controls how much the output polygons are simplified to reduce complexity. Higher values produce simpler polygons with fewer vertices, while lower values preserve more detail.
  * Example:
    * <kbd>"polygon\_simplification\_tolerance": 0.9</kbd>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.imerit.net/plugins/first-party-ango-plugins/sam-3.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
