# Brush

The brush labeling tool is a pixel-wise tool to assign pixels on images and videos to certain classes.

{% hint style="info" %}
The Brush tool is supported across the Image labeling editor.
{% endhint %}

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FtOeMR0b1AuHqyhGVmUgW%2FLarge%20GIF%20(634x510).gif?alt=media&#x26;token=83da4747-4654-42f5-9b70-f2fa67211047" alt=""><figcaption></figcaption></figure>

## Adding a Brush tool to your project <a href="#how-to-add-a-bounding-box-tool-to-your-project" id="how-to-add-a-bounding-box-tool-to-your-project"></a>

From the project’s *Settings* tab, enter the *Category Schema* section.

Click on *Add Category*. From the list that appears, click on *Brush*.

A new row will appear named *Brush*. Click on it to expand it.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F4ecjAv44vr8YmT2WMEc9%2Fimage.png?alt=media&#x26;token=9ef6a797-3e6b-4afb-9872-660250b059bd" alt=""><figcaption></figcaption></figure>

Give your brush tool a title.

Enable the *Required* toggle if you want to force labelers to create brush traces for each asset. When the toggle is disabled, labelers will be able to save and move to the next asset without creating brush traces using the class you've just created.

If you would like to ask labelers further questions, for example, if you want to show a further *radio* after drawing brush traces, on each individual brush trace instance, click on *Add Classification* and add a further question. [More on nested questions here](https://docs.imerit.net/labeling/labeling-tools/tools/nested-classifications).

### Brush Options <a href="#how-to-draw-a-bounding-box" id="how-to-draw-a-bounding-box"></a>

#### After selecting a Brush tool, in Pen mode

When you select a *Brush* tool, a number of options will appear on screen. Here is what will appear once you select a brush:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FDA7NksnN4QU4rUFwbeJ3%2Fimage.png?alt=media&#x26;token=8b806df0-4434-4cec-992d-3c2a5a485359" alt=""><figcaption></figcaption></figure>

**Enable Brush Mode**: By default, the Brush will start in the "Pen" tool, allowing you to create traces by drawing their borders. Clicking on this icon will switch you to the Brush mode.

**Enable Pen Mode**: Switches the tool back to Pen mode.

**Overwrite**: Normally, the brush will not paint over existing traces. When this toggle is enabled, it will.

#### After selecting a Brush tool, in Brush mode <a href="#how-to-draw-a-bounding-box" id="how-to-draw-a-bounding-box"></a>

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FhKtJFhLlZtdd4iI1aRsy%2Fimage.png?alt=media&#x26;token=66f48cf1-d467-48a1-9033-849bbf07adac" alt=""><figcaption></figcaption></figure>

**Brush Size Slider**: Change the diameter of the brush. Also available using Shift + Scroll Wheel.

#### After clicking on a brush trace instance <a href="#how-to-draw-a-bounding-box" id="how-to-draw-a-bounding-box"></a>

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FiXrh85CrGZKl4uXFDflh%2Fimage.png?alt=media&#x26;token=94d4996e-d2f7-4bcf-9442-44a0e1aa6072" alt=""><figcaption></figcaption></figure>

**Eraser**: Enter Eraser mode. In Eraser mode, traces you create will remove pixels from the currently selected instance.

## Using the Brush Tool <a href="#how-to-draw-a-bounding-box" id="how-to-draw-a-bounding-box"></a>

Select a *Brush* tool from the *Tools* section in the left sidebar of the labeling editor.

By default, the Brush tool will open in Pen mode. Draw the border of the brush trace you would like to create. Click back on the start dot or press N on your keyboard to close the trace.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FZLs9EbZ3E079EZXSN9ci%2FKapture%202024-10-11%20at%2015.09.23.gif?alt=media&#x26;token=80d8dfa9-5d0a-43ee-b08f-fa5d63a364a7" alt=""><figcaption></figcaption></figure>

Ango Hub will automatically select and highlight the trace you have just created. To continue adding pixels to this instance, keep drawing. To remove pixels from this instance, click on the "Scissors" icon at the top. To close this instance for now, deselect the Brush tool by clicking on it in the Tools list, or by pressing Esc on your keyboard.

If in Brush mode, click and drag on the image where you'd like to draw traces.

### Bucket Fill Mode

While a Brush-type tool is selected, you may switch to "Bucket fill" mode by clicking on the bucket button at the top, or the "V" shortcut.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FW5z83X5KssWRhf6OoxkY%2Fimage.png?alt=media&#x26;token=d92da922-2e17-4fcf-a4c0-aedc2da08e72" alt=""><figcaption></figcaption></figure>

When Bucket Fill mode is enabled, a single click on the image will select contiguous pixels sharing similar colors.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FEIR8iMxZUcsBpIK7HLGA%2FKapture%202025-08-18%20at%2014.01.17.gif?alt=media&#x26;token=46298de7-a2d6-48ed-ac77-e45cdc6987e9" alt=""><figcaption></figcaption></figure>

Increasing the "Threshold" will make it so that more pixels are selected. Decreasing it makes it so that only pixels with very close color values will be selected.

At first, your bucket selection will appear in white (1). You may then click on different parts of the image and change your threshold to edit your selection. Once you are done and you wish to confirm your selection, click on the "Tick" button (2). This will turn your selection into a brush instance.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FZ70VHPxNa0gtERR1hxWx%2Fimage.png?alt=media&#x26;token=b562c5ed-0abc-47b7-b129-b7e6fe0341ab" alt=""><figcaption></figcaption></figure>

## Editing Brush Instances

### Adding/Removing pixels to/from the instance

Click on the instance you'd like to edit, then from the top toolbar, select the tool you would like to use to edit the instance, either Pen or Brush. This will enter "Edit Mode" for that instance.

To continue adding pixels to this instance, draw on screen. To remove pixels from this instance, click on the "Scissors" icon at the top and draw where you would like to remove pixels.

Deselect the Brush tool by clicking on it in the Tools list, or by pressing Esc on your keyboard when you are done.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FckD9786BY3DDNnNJtJXB%2FKapture%202024-10-11%20at%2015.18.27.gif?alt=media&#x26;token=602d7e64-98ab-4246-bff2-7a9d25bd834f" alt=""><figcaption></figcaption></figure>

### Changing the class of an existing instance

#### With the mouse

Left-click on an existing instance to select it. Right-click on it to open the context menu. From the three dots, navigate to "Change Category" and select the new class for the instance. See video:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FAdeJnAX09SW0mP9F2nzA%2FKapture%202024-10-30%20at%2009.35.59.gif?alt=media&#x26;token=bee4255a-e133-4f4c-9f65-f8f846db941e" alt=""><figcaption></figcaption></figure>

#### With the keyboard

Left-click on an existing instance to select it. On your keyboard, press the Alt (Options) button plus the keyboard shortcut number for the class you would like to change the instance to.

For example, in the GIF above, the class Brush\_3 has a keyboard shortcut number of 3. If I wanted to change the existing trace to that class, I would left-click on it then press Alt + 3.
