# ATOM powered by SAM

ATOM is an AI-powered segmentation tool that can be used for [Instance](https://hasty.ai/docs/mp-wiki/model-families/instance-segmentor) and [Semantic Segmentation](https://hasty.ai/docs/mp-wiki/model-families/semantic-segmentor). It is available from the start of every project.

With the [Segment Anything Model](https://segment-anything.com/) (SAM) release, Hasty reviewed its approach to ATOM by making it powered by SAM.

### How it works <a href="#how-it-works" id="how-it-works"></a>

First, when being in an annotation environment, select the ATOM tool either by clicking the corresponding icon in the instrument’s panel on the left

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/atom-segmenter/2e87df518b-1685437524/snimok-ekrana-2023-05-30-v-17.07.57.webp" alt=""><figcaption></figcaption></figure>

...or by pressing the hot key C.

With the ATOM tool selected, please view its potential options in the upper toolbar. These are:

* Points;
* Scribble;
* Box.

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/atom-segmenter/e628da2329-1685437524/snimok-ekrana-2023-05-30-v-17.10.02.webp" alt=""><figcaption></figcaption></figure>

The approaches stick to the same philosophy but are slightly different in utilization. Let’s get through them one by one.

#### Points <a href="#points" id="points"></a>

With the Points option selected, please click in the middle of the object/area you want to annotate.

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/atom-segmenter/f5bf7b7cf0-1685437524/snimok-ekrana-2023-05-30-v-17.22.23.webp" alt=""><figcaption></figcaption></figure>

Click on areas that you want to add to the original selection.

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/atom-segmenter/407048fc4a-1685437524/snimok-ekrana-2023-05-30-v-17.23.04.webp" alt=""><figcaption></figcaption></figure>

To remove areas that you don't want included, click inside of the prediction.

When you are happy with the selection, click "Done" in the top bar or press "Enter" to turn your selection into an annotation.

If you misplaced a click, you can also undo - either by pressing Backspace/Del to remove the last point, or by pressing CMD/CTRL+Z to undo your latest action.

If you want to start over without saving your selection, press "Esc" or "Discard" in the top navigation bar.

#### Scribble <a href="#scribble" id="scribble"></a>

With the Scribble option selected, please draw on top of an object you want to annotate. You can also adjust the width of the brush to make the process easier.

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/atom-segmenter/adf1f90d7b-1685437620/ezgif-2-c8aacc4e07.webp" alt=""><figcaption></figcaption></figure>

#### Box <a href="#box" id="box"></a>

With the Box option selected, please roughly draw a box around an object or objects.

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/atom-segmenter/b22e76a83d-1685437620/ezgif-2-bd0067ca2b.webp" alt=""><figcaption></figcaption></figure>

#### Additional options <a href="#additional-options" id="additional-options"></a>

The additional options include:

* **Mask size level** - by default, SAM produces 3 mask candidates. This option gives you an opportunity to switch between them on the fly.
* **Use viewport** - when this option is activated, the predictions will be generated inside the viewport. When deactivated, it will take the entire image to make a prediction.

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/atom-segmenter/0d075e92fa-1685437524/snimok-ekrana-2023-05-30-v-17.26.02.webp" alt=""><figcaption><p>Prediction with the Use viewport flag toggled on</p></figcaption></figure>

{% hint style="info" %}
It's called ATOM because we, in internal testing, kept testing it by clicking round shapes. The end result often looked like an atom. We do have an employee with a doctorate in Physics - he is slightly skeptical of the name.
{% endhint %}
