> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/documentation/auto-labeling/detect-anything-sam-1-sam-3.md).

# Detect Anything (SAM 1–SAM 3)

Choose and operate Unitlab’s SAM-assisted segmentation, class-prompt detection, and supported geometry workflows.

Unitlab combines interactive segmentation, class-prompted detection, and temporal propagation under one governed annotation workflow. Choose the smallest operation that produces the geometry you need, then review the proposals before moving the item forward.

![Magic Touch and repeated-object assistance in the Unitlab Workbench](https://292810646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGjVLUz4wthGkGlRKM6rM%2Fuploads%2FrCcVkvXnwXbKswXGmGDP%2Fauto-labeling-detect-and-similar.avif?alt=media)

*Current Unitlab product visual: one assisted selection becomes a set of editable object proposals.*

{% hint style="info" %}
The current Workbench exposes **SAM 1** and **SAM 3** for interactive segmentation. **Detect all objects** is the SAM 3 class-prompt operation. Temporal propagation belongs to [Bidirectional Auto-Tracking](/documentation/auto-labeling/bidirectional-auto-tracking.md); SAM 2 is not a selectable Detect-all generation in the current UI.
{% endhint %}

### Choose the operation

| Goal                                                | Operation                                                                                  | Current output                                            |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------- |
| Isolate one object from a point or guided region    | Magic Touch with SAM 1 or SAM 3                                                            | Editable segmentation mask                                |
| Detect every visible instance of one class          | Detect all objects with SAM 3                                                              | Bounding box, polygon, mask, or cuboid                    |
| Find more objects that resemble a confirmed example | [Find Similar](/documentation/auto-labeling/find-similar.md)                               | Bounding box, polygon, mask, or cuboid proposals          |
| Describe the target in natural language             | [Prompt Labeling](/documentation/auto-labeling/prompt-labeling.md)                         | Class-bound SAM 3 proposals on the current image or frame |
| Propagate an object through a sequence              | [Bidirectional Auto-Tracking](/documentation/auto-labeling/bidirectional-auto-tracking.md) | Frame- or slice-aware object track                        |

### Supported scope

**Detect all objects** is available for an image and for the current video frame. Select an ontology class whose geometry is one of:

* bounding box;
* polygon;
* segmentation mask;
* cuboid / 3D box.

The operation is class-aware. Unitlab writes accepted output to the active class, so the prompt does not replace ontology governance.

### Before you start

* Open an image or a video frame in the [Annotation Workbench](/documentation/annotations/annotation-workbench.md).
* Confirm the intended class exists in the project ontology.
* Choose the geometry required by the downstream model.
* Read the project Instructions for inclusion, exclusion, truncation, and occlusion policy.
* Start on a representative item before processing dense or unusual scenes.

### Detect all objects

{% stepper %}
{% step %}

#### Select the class

Open **Classes** and select the exact ontology class. Detect all is unavailable when the active class uses an unsupported geometry.
{% endstep %}

{% step %}

#### Open Auto-labeling

Select the wand action in the vertical toolbar or press **S**. You can also open the class action for **Detect all objects of this class**.
{% endstep %}

{% step %}

#### Set the prompt

The prompt begins with the class name. Keep it when the ontology name is visually specific, or replace it with a clearer description. The current input accepts up to 300 characters.
{% endstep %}

{% step %}

#### Run detection

Select **Detect all objects**. Unitlab evaluates the current image or current frame and returns candidate instances in the active geometry.
{% endstep %}

{% step %}

#### Review and correct

Inspect false positives, misses, overlap, truncation, small objects, and boundary quality. Correct accepted geometry with the standard Workbench tools.
{% endstep %}
{% endstepper %}

### Geometry guidance

| Geometry        | Use it when                                              | Review closely                                      |
| --------------- | -------------------------------------------------------- | --------------------------------------------------- |
| Bounding box    | Coarse localization is sufficient                        | Tightness, truncation, overlap, tiny-object misses  |
| Polygon         | Boundary shape matters but a raster mask is not required | Vertex placement, holes, self-intersection          |
| Mask            | Pixel membership drives training or measurement          | Leakage, holes, thin structures, touching instances |
| Cuboid / 3D box | Orientation and spatial extent are part of the label     | Vanishing direction, depth edges, ground contact    |

### SAM selection

Use **SAM 1** when a stable interactive mask is sufficient and the operator wants a familiar click-guided segmentation path. Use **SAM 3** for the current concept-aware segmentation and class-prompted Detect-all experience. Validate either choice on the same representative sample before standardizing it for a team.

{% hint style="warning" %}
A model proposal is not ground truth. A qualified annotator must validate class, geometry, attributes, relations, temporal identity, and workflow outcome.
{% endhint %}

### Quality checklist

* The active ontology class is correct.
* Every proposal follows the project’s inclusion and occlusion policy.
* Duplicate and strongly overlapping proposals are removed.
* Small, partially visible, and edge-of-frame instances were inspected.
* Geometry was corrected at the zoom level required by Instructions.
* Required properties and relations are complete before submission.

### Troubleshooting

| Symptom                          | Check                                                                                           |
| -------------------------------- | ----------------------------------------------------------------------------------------------- |
| Wand action is unavailable       | Confirm the item is an image or video and the active class is box, polygon, mask, or cuboid     |
| No objects are returned          | Use a more concrete prompt, verify the object is visible, and test another representative frame |
| Too many unrelated objects       | Narrow the prompt with object type, visual context, or distinguishing state                     |
| Boundary quality is insufficient | Switch to mask or polygon output and correct with brush, eraser, or vertex tools                |
| Results drift across time        | Detect on a reliable frame, then use bidirectional tracking and review the timeline             |

### Related guides

* [Prompt Labeling](/documentation/auto-labeling/prompt-labeling.md)
* [Find Similar](/documentation/auto-labeling/find-similar.md)
* [Bidirectional Auto-Tracking](/documentation/auto-labeling/bidirectional-auto-tracking.md)
* [Image Annotation](/documentation/annotations/image-annotation.md)
* [Video Annotation](/documentation/annotations/video-annotation.md)
