Ontology: Labels and Attributes
  • 18 Nov 2024
  • Dark
    Light
  • PDF

Ontology: Labels and Attributes

  • Dark
    Light
  • PDF

Article summary

Labels

labels are identifiers or tags assigned to data elements to describe their characteristics or categories. Labels define the category, class, or attribute of a data element (e.g., "Dog," "Building," "Stop Sign"). Labels provide structured information to raw data (e.g., images, videos, text), making it usable for machine learning and AI tasks.

Labels are part of an ontology to ensure consistency and uniformity in the annotation process.


Label Color

When creating a label in the recipe, the label is given a default color. For all annotation tools except Semantic Segmentation, the label color will only affect the platform UI and is for the user’s convenience to differentiate between annotations of different labels over an image/video and other files.

For the Semantic Segmentation tool, the color of the label will be reflected in the masked item’s output. If your model already has its RGB for the masked output, make sure to set the label's colors accordingly.

  • Changing the default color - The default color assigned t a label can be changed. Click the colored circle to select a color from the palette, or enter RGB values.
  • Changing color for semantic segmentation - changing the color of the label used for semantic segmentation will impact only new annotations from that point onward. The color of existing annotations is saved on the mask in the item's JSON, and therefore won't affect all existing JSON files.

For more information about the Semantic Segmentation tool, click here.


Hierarchical/Nested Labels (sub-labels)

Labels in the recipe have a Dot Name Spacing (dot-separated structure), allowing you to create tree-like label descriptions (sub-labels that are in a hierarchy with other labels).
A well-defined labels hierarchy enables annotators to accurately classify annotations based on logical structure, with correlation with Dataloop advanced tools for labels-based search and filter on items and annotations level.

In New Label, enter the Parent label name + "." + "child" label, and click the plus icon. For example:

  • car
    • car.window

      • car.window.glass

Labels as Images (Thumbnails)

Add images to labels in the recipe, to enable label selection in annotation tasks based on the similarity of the image to the label’s thumbnail. Ideal for retail annotation tasks.

Click on the + icon next to the label and select the image from your computer directory.


Reordering Labels

Labels can be reordered differently than creation order, to allow prioritizing and displaying at the top of the list during labeling tasks. To reorder labels, drag and drop them to the desired position.


How to Add Labels in a Recipe?

  1. Go to the Ontology section.
  2. Find and open the recipe.
  3. In the Labels & Attributes tab, enter your label name and press Enter key or click the + icon.

Attributes

Attributes are created separately and can be mapped to specific labels, e.g. determining for each attribute the labels it applies to. Attributes have the following fields:

  • Scope: Where mapping to labels is done. The default applies any attribute to all labels, but individual selection can be done. By default, scoping a label applies the attribute automatically to all sub-labels.
  • Mandatory: Enforce annotators to answer attributes in Studio 2.0 before clicking Done and moving to the next item. The feature is enabled from recipe instructions, and applies to any attribute set as ‘Mandatory’.
    While working in the Studio, mandatory attributes skipped will show with a red flag icon, requiring annotators’ attention.
Mandatory Attributes Enforcement

Mandatory attribute enforcement occurs only when working on a single item in the respective studio. Due to the nature of this work, mandatory attributes are not enforced when working in bulk from the Assignment Browser.

  • Type - selection and representation type of the attribute:
    • Checkbox: Multiple selection options
    • Radio button: Single-choice type
    • Slider: Selecting from a range of values (for example, between 1 and 10)
    • Yes/No: A shortcut for you to have a radio button-based yes/no attribute
    • Free text: Allows an annotator to use free text to answer questions and provide information
  • Subject: The guidance/question presented to the annotator, on how to fill this attribute.
  • Section ID: Allows referring to this attribute via JSON exports and metadata. It’s autopopulated with a running number but can be edited to any value.

How to Add an Attribute in the Recipe?

  1. Go to the Ontology section.
  2. Find and open the recipe.
  3. In the Labels & Attributes tab, click Add Attribute.
  4. Select the label from the list in which you need to add an attribute.
  5. Update required fields. Refer to the previous section for detailed information.
  6. Click Save to save the changes.
  7. Click the Save icon to save the recipe.

How to Delete an Attribute?

  1. Go to the Ontology section.
  2. Find and open the recipe.
  3. In the Labels & Attributes tab, identify the attribute from the list.
  4. Click to expand it.
  5. Click Delete.
  6. Click Save to save the changes.
  7. Click the Save icon to save the recipe.