> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SAM 3

SAM 3 enables you to label one, multiple, or all object instances at the same time, and track it either forwards or backwards across multiple frames.

## Ontologies

The following table shows the Ontology shapes for which SAM 3 can be used.

| **Ontology Shape**     | **SAM 3 Availability** |
| ---------------------- | ---------------------- |
| Bounding box           | ✅                      |
| Rotatable bounding box | ❌                      |
| Polygon                | ✅                      |
| Polyline               | ❌                      |
| Primitive              | ❌                      |
| Keypoint               | ❌                      |
| Bitmask                | ✅                      |

***

## Modalities

The following table shows the modalities that support SAM 3 tracking.

| **Modalities**  | **SAM 3 Availability** |
| --------------- | ---------------------- |
| Images          | ✅                      |
| Videos          | ✅                      |
| Image Groups    | ❌                      |
| Image Sequences | ✅                      |
| DICOM           | ❌                      |

***

## Using SAM 3

<Note>SAM 3 is computationally intensive and performance might be slower than other labeling actions.</Note>

### Label All Objects

There are two ways to label all objects of a specific Ontology class.

**Method 1**:

Click the *Sparkles* symbol in the Class.

<Tip>
  This action can be undone using <kbd>CMD / CTRL </kbd> + <kbd>Z</kbd>
</Tip>

<div class="flex justify-center">
  <img src="https://storage.googleapis.com/docs-media.encord.com/sam3-detect-all.png" />
</div>

**Method 2**:

1. Click the *Wand* icon in the Class.

2. In the SAM 3 pop-up, ensure the toggle is set to **All objects prediction**.

3. Type the name of the class you want to label.

4. Click **Detect all objects**.

<div class="flex justify-center">
  <img src="https://storage.googleapis.com/docs-media.encord.com/sam3-label-all-2.png" />
</div>

5. Optionally, remove unwanted objects using the *Delete* button on an instance.

6. Click **Done**.

***

### Label One Or More Objects

1. Select the *Wand* icon in the Ontology class you want to label.
   A SAM 3 pop-up appears.

2. In the SAM 3 pop-up, ensure the toggle is set to **Single-object detection**.

<div class="flex justify-center">
  <img src="https://storage.googleapis.com/docs-media.encord.com/sam3-single-object.png" />
</div>

3. Select the objects you want to label by either clicking a single object or clicking and dragging across the area of the frame containing multiple objects.

4. Optionally [track](#sam-3-tracking) the objects across frames.

5. Click **Save**.
