# Define Classes & Tags

Definitions are a centralized place where all classes and tags used for data annotation are managed.\
A class defines an object category and specifies the type of geometry that will represent this class in annotations, such as bounding boxes, masks, polygons, etc.\
Tags describe not only the annotations themselves but can also apply to frames, images, and more.\
Properly defined classes and tags ensure consistent and structured annotations throughout the entire project

The **Definitions** tab, available both in the Project and in the Labeling Tool, is divided into two main categories:

1. **Classes** - for managing object classes.
2. **Tags** - for managing tags used in data annotation.

## 1. In Panel

### Definitions tab functions

* **Adding a new classes and tags**: you can create a new class or tag by clicking the `+ NEW CLASS` or `+ NEW TAG` button and filling in the required fields.
* **Editing**: each class and tag can be edited by changing its parameters such as name, color, scope and value type.
* **Archiving**: if a class or tag is not needed temporarily, it can be archived so that it is not displayed in the list of active elements but remains in the project. Archived classes and tags can be restored at any time.
* **Sorting**: Sort classes and tags to quickly find the elements you need.
  * **Newest (default)** - displays the most recently created items first.
  * **Oldest** - displays the oldest items first.
  * **Name (A-Z)** and **Name (Z-A)** - sorts items alphabetically in ascending or descending order.
  * **Shape (A-Z)** and **Shape (Z-A)** - **(for classes only)** sorts items by shape type in ascending or descending order.

<div><figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2F997Mro6PEgFfcNGljgqB%2Fclasses0.png?alt=media&#x26;token=e99aabda-cbd6-4fe2-a18e-4abc41fdac84" alt=""><figcaption></figcaption></figure> <figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2FUWcF3jxLvPTWvxlnfmNO%2Ftags.png?alt=media&#x26;token=81a59cae-91b2-46d9-afe1-b314b690e422" alt=""><figcaption></figcaption></figure></div>

## Classes & Tags: distinctions <a href="#tags--classes-distinctions" id="tags--classes-distinctions"></a>

Although both tags and classes are used to identify objects, they serve distinct purposes:

* **Classes:** Represent clear categories that an object belongs to, such as "car", "truck", or "bus" for vehicles.
* **Tags:** Provide specific information about objects or images, such as context or properties. Tags are more flexible and can include details not tied to formal classifications. For example, the tag "Traffic Density" can have values "High" or "Low" indicating the level of traffic density, and the tag "Action" can signify the actions of an object (e.g. "Stopped" or "Moves").

An image or an object can have multiple tags assigned, while each object usually belongs to a single class, i.e. classes are used to explicitly categorize objects. Tags can be more personalized and focused on specific characteristics and attributes. Tags typically add context and descriptive attributes not necessarily related to the formal classification of an object.

{% hint style="info" %}
Tags provide a more flexible and free way to describe, while classes provide a formalized structure for training models.
{% endhint %}

## Classes

**Classes** are object categories used to annotate images and video by creating shapes on objects. Each class represents an object type, and each annotated object in an image or video frame has exactly one class associated with it.

* **TITLE** - the name of the class. The name should be unique and clearly describe the object, for example, "Person," "Car," or "Tree."
* **SHAPE** - the annotation shape for the class. Available options include [Bounding Box](https://docs.supervisely.com/labeling/labeling-tools/bounding-box-rectangle-tool), [Mask](https://docs.supervisely.com/labeling/labeling-tools/mask-pen-tool), [Polygon](https://docs.supervisely.com/labeling/labeling-tools/polygon-tool), [Keypoints](https://docs.supervisely.com/labeling/labeling-tools/graph-keypoints-tool), [Points](https://docs.supervisely.com/labeling/labeling-tools/point-tool), [Line](https://docs.supervisely.com/labeling/labeling-tools/polyline-tool), Cuboid 2D, Alpha Mask, and Any Shape.
* **COLOR** - the color assigned to the class, displayed on the screen to visually differentiate the annotation.
* **HOTKEY** - a shortcut key assigned to the class for quick annotation during labeling.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2FF7TsV1lIm3KDRWXHpgCu%2Fclasses-1.png?alt=media&#x26;token=7425b9b0-10e3-4c07-a1f3-8cb30ac92956" alt=""><figcaption></figcaption></figure>

### How to create a new class

1. Click on the `+ NEW CLASS` **button** to start creating a new class.
2. Set a **unique title** for the class to clearly identify it.
3. Add a **description (optional)** and assign a [**hotkey**](#user-content-fn-1)[^1] for quick selection during labeling.
4. Choose the **Shape** for the class (e.g., Bounding Box to label an object with rectangular frame).

{% hint style="info" %}
**Note**: Some shapes are only applicable to specific labeling tools (e.g., Cuboid 2D is relevant for Point Cloud and Point Cloud Episodes).
{% endhint %}

5. Generate or choose a **color** for the class to visually differentiate it from other classes.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2F6FuAKvGFcsdNsbdoZWhH%2Fnew-class.png?alt=media&#x26;token=eba88f1e-763e-4b0b-a801-4cfd03b2ab8b" alt="" width="375"><figcaption></figcaption></figure>

## Tags

**Tags** serve as data annotation and classification tool. These attributes, assigned to images/videos or labeled objects, make it simple to sort things and give important information about what's in an image.

* **TITLE** - the name of the tag. Like classes, tags should have unique names, for example, "Highway", "Traffic Density", "Action".
* **APPLICABLE TO** - the scope of the tag's application (e.g., video only, objects only, videos and objects).
  * **Image Tags:** Apply to images and provide information like category, properties (resolution), geographic details, and content.

    **Object Tags:** Apply to objects within images, detailing characteristics (e.g., "broken" equipment), state (e.g., "ripe" fruit), and localization (e.g., "anterior" placenta).
  * Some tags can be applied to **both images and objects**. Such Tags may describe both image characteristics and individual objects at the same time, providing comprehensive labeling.
* **SCOPE** (**for videos project)** - the tag's range of application:
  * **Global** - the tag applies to the entire video or object.
  * **Frame-based** - the tag applies only to specific frames in the video.
  * **Global and Frame-based** - allows you to use a tag for the entire video or object as well as for individual frames at the same time. This means that you can set a global tag for the entire video or object, denoting a permanent property, and apply it to individual frames to label temporary changes or events.
* **TAG VALUE TYPE** - the type of value associated with the tag:
  * **None (Tag without Value):** Used to flag specific properties. For example, a tag "train" might mark data for neural network training.
  * **Text Tag:** Contains textual descriptions or comments about the object or image.
  * **Number Tag:** Represents numeric properties, useful for regression tasks (e.g., size, weight).
  * **One of:** Indicates that the value must be one of a predefined set, such as colors (Red, Blue, Green).
* **COLOR** - the color displayed on the screen to make the tag easily identifiable.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2FIc9WHf0LbOEQRxwfzFBY%2Ftags-1.png?alt=media&#x26;token=63d4e75d-b530-4cda-bfc7-a5ef47e8672b" alt=""><figcaption></figcaption></figure>

### How to create a new tag

1. Click on the `+ NEW TAG` **button** to start creating a new tag.
2. Set a **unique title** for the tag to clearly identify it.
3. Assign a **hotkey (optional)** for quick selection during labeling.
4. Choose or generate a **color** for the tag to visually distinguish it from other tags.
5. Select **"Applicable to"** to define whether the tag will be used for:
   * Images and objects
   * Images only
   * Objects only
6. Define the **tag's value type**:
   * **None**: a tag without a value.
   * **Text**: allows adding a text description or comments.
   * **Number**: represents numerical properties.
   * **Single choice (One of)**: select one option from a predefined set.
7. Additional **Scope** option for video projects:
   * **Global and Frame-based**: tag can be applied globally or to specific frames.
   * **Frame-based**: tag is applied only to specific frames.
   * **Global**: tag applies to the entire video or object as a whole.
8. Click **Save** to complete the creation of the new tag.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fu7zMQsVC4bViJboYFMBg%2Fnew-tag.png?alt=media&#x26;token=79bbddf7-b1a4-40c5-bf84-5664801465cf" alt="" width="359"><figcaption></figcaption></figure>

### Multiple tags mode

To apply the same tag multiple times:

1. **From the Project:** Go to Settings > Tags and find Multiple Tags Mode.
2. **From the Image Labeling Toolbox:** Click on the Tag icon, hover over 🔁, and click the blue link Setting to enable Multiple Tags Mode.

To learn more about the practical uses of tags and explore advanced tools, check out our in-depth blog post: [Mastering Image Tagging](https://supervisely.com/blog/mastering-image-tagging/). This guide provides valuable insights and real-world examples to help you maximize the potential of tagging in your projects.

{% embed url="<https://supervisely.com/blog/mastering-image-tagging/>" %}

## 2. Defining Classes and Tags Directly in Labeling Toolbox

**Classes** and **Tags** created manually by an annotator inside the Labeling Tool (during the annotation process) are automatically added to the project's **Definitions** on the Projects page.

These classes and tags immediately become available to all team members - they appear in the Labeling Tool for other annotators as well.

**This behavior enables the following:**

* Dynamic expansion of the project structure, even if the Definitions were not configured in advance.
* Consistency across the team, by maintaining a single, shared list of classes and tags.
* Avoiding duplication, since new items are added directly to the central schema.

### Where to Define Classes and Tags in the Labeling Tool

The locations where classes and tags can be defined directly in the Labeling Tool vary depending on the type of data being annotated. This is expected, since the interface of the Labeling Tool also slightly differs based on the data type in use.

Let's go through each case one by one.

#### 1. When annotating an Images:

When working with images, the **Definitions panel** is located on the left side of the Labeling Tool.

To add a new class or tag:

1. click the plus **`+`** on the panel, then choose whether you want to add a class or a tag.
2. In the modal window that appears, configure the class or tag parameters, then click **`Create`** to save it.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-7e7c19af09ad472f6ca043abc3543c4339c050ed%2Fdefinitions-labtool-image.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

The newly created class or tag will immediately appear in the **Definitions panel** for all annotators and become available for annotation.

To create a new **Class** and simultaneously reassign it to an existing object in the project:

1. In the Objects panel (located on the right side of the Labeling Tool), select an object and click **`⌄`** next to its current class name. And in the dropdown menu, select ***Create class***.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-2e7169e96a3fe60611497ded88134966e83f8767%2Fdefinitions-labtool-image1.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

2. In the modal window that appears, configure the new class parameters, then click **`Create`** to save it.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-76fe098776520f06ea90cdb014aae9e46b79661b%2Fdefinitions-labtool-image3.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

The new class will immediately appear in the Definitions panel on the left and will be automatically assigned to the selected object in the **Objects panel**.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-fa22f08cd8d4428c0e823b627d7e72001293cec1%2Fdefinitions-labtool-image4.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

#### 2. When annotating a Video:

When working with videos, the **Definitions panel** is located on the right side of the Labeling Tool.

To add a new class or tag:

1. click the plus **`+`** on the panel, then choose whether you want to add a class or a tag.
2. In the modal window that appears, configure the class or tag parameters, then click **`Create`** to save it.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-a84748d98c9c02d8d91aa6883ec9633e1ab977ea%2Fdefinitions-labtool-video.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

The newly created class or tag will immediately appear in the **Definitions panel** for all annotators and become available for annotation.

#### 3. When annotating a Dicom Volume or a Point Cloud:

The locations where classes and tags can be defined in the Labeling Tool are the same for **Dicom Volume** and **Point Cloud**.

Let's walk through the process using **Dicom Volume** as an example.

So you can create a new class directly from the Objects panel and simultaneously reassign it to an existing object in the project.

To do this:

1. In the Objects panel (located on the right side of the Labeling Tool), select an object and click **`⌄`** next to its current class name. And in the dropdown menu, select ***Create class***.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-7bf8e79604c3748b6b1b875e5a2f7d3e88e191b1%2Fdefinitions-labtool-volume-class1.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

2. In the modal window that appears, configure the new class parameters, then click **`Create`** to save it.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-5686fdadf919526bac2241b3af40aa8b69dfa5f6%2Fdefinitions-labtool-volume-class2.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

**Creating a New Tag from the Objects Panel**

You can also create a new **Tag** directly from the **Objects panel** while annotating an object:

In the **Objects panel**, select an object.

In the **Tags Available** section, click the ***Add project tags definitions*** icon.

In the modal window that appears, configure the new tag parameters, then click **`Create`** to save it.

<figure><img src="https://1080806899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4BHwRbuyIoH-xoF3Gv%2Fuploads%2Fgit-blob-674baf3db75a97c472bf044913e41bf79b0e556c%2Fdefinitions-labtool-volume-tags1.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

The newly created tag will immediately appear in the **Objects panel** for all annotators and become available for annotation.

[^1]: You can only set a single latin character (because other combinations may be unavailable).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.supervisely.com/data-organization/project-dataset/define-classes-tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
