Ontologies are hierarchical structures that define the top-level concepts and categories in your data, along with nested attributes for detailed annotations. They consist of Classes at the top level, which can be either Objects or Classifications.

  • Objects: Used to label specific locations in a frame, such as a car in a video frame.
  • Classifications: Frame-level labels that do not have a specific location, such as indicating if an image is taken during the day or night.
  • Attributes: These can be nested under objects, classifications, or other attributes to create detailed, hierarchical structures. For example, the object “horse” can have an attribute “color”.

READ ME FIRST

The annotation landscape is vast. Encord provides an incredible amount of flexibility in how to create an Ontology. Your Ontology is a product of your needs. Here are a few things to keep in mind when building your Ontology.

Ontology Structure

Objects

Objects are configured with a title, an object annotation type, and optional attributes. You can also change their color.

All objects can be marked as Required.

The following object annotation types are available:

ObjectDescriptionSupported For
Bounding BoxA quick-to-draw box shape compatible with many advanced automated labeling techniques.Single images, image groups, image sequences, videos, DICOM, NIfTI, Documents
Rotatable Bounding BoxA rotatable box for more accurate labels than standard bounding boxes.Single images, image groups, image sequences, videos, DICOM, NIfTI, Documents
PolygonCaptures complex shapes that bounding boxes cannot. Known as segmentations, polygons cannot be self-intersecting, but can be nested within other polygons.Single images, image groups, image sequences, videos, DICOM, NIfTI, Documents
PolylineAn unclosed polygon for representing long, thin annotations.Single images, image groups, image sequences, videos, DICOM, NIfTI, Documents
KeypointA simple geometric point for tracking small objects or specific points on larger objects.Single images, image groups, image sequences, videos, DICOM, NIfTI, Documents
BitmaskCreates complex shapes with a brush tool, useful for parts of a frame or image. Multiple threshold filters can apply bitmasks to specific areas.Single images, image groups, image sequences, videos, DICOM, NIfTI, Documents
Object PrimitivePreviously called Skeleton template. A collection of connected geometric points, ideal for representing complex shapes like those in pose estimation. See here to learn more.Single images, image groups, image sequences, videos, DICOM, NIfTI, Documents
Audio RegionAn object used exclusively to label parts of an audio wave. See our documentation for labeling audio files to learn more.Audio
Text RegionAn object used exclusively to label parts of a text document. See our documentation for text files to learn more.Text

Classifications

Classifications are supported for all modalities

Since classifications apply to the entire frame, there is no need for specific colors or shapes. Classification annotation types include:

  • Checklist: Allows multiple values. For example, “Weather” could be both cloudy and rainy.
  • Radio: Allows a single value. For example, “Time of day” could be “Day” or “Night.”
  • Text: Allows freeform input for each situation.
Radio buttons can nest up to 7 layers deep. Check boxes and text fields do not support nesting.

Mark as Required

Any object, classification, or attribute can be marked as Required. This means annotators must include at least one instance of the required feature in each task before submitting.

If annotators try to submit a task without including a Required object or classification, they see the following warning message.

Click View issue to open the Issues drawer. From there annotators can seamlessly resolve all Task requirement issues before moving onto the next task.

All Required objects and classifications create Task requirement issues.

Attributes

Attributes can be nested under objects or any classification with a Radio annotation type. To nest attributes, set the type to Radio, then click the Configure button next to the value where you want to add a new attribute.

Attributes can be marked as Required, Dynamic, or Relation.

Dynamic Attributes

Top-level attributes can be marked as Dynamic to allow their values to change over time in a video. This is useful for representing temporary states—for example, a person can be labeled as “moving” in one segment and “stationary” in another.

Refer to our this documentation to learn how to use dynamic attributes in the Label Editor, and apply dynamic attributes to a range of frames in a video.

Relation Attributes

The Relation attribute lets you link objects and define their relationship using free-text, regardless of annotation type.

Only one of the linked objects needs a Relation attribute for the link to be established. For example, to relate a chicken and a chicken wing, add a Relation attribute to either object in the Ontology.

Relation attributes must be text fields (they cannot be radio buttons or checklists). They can be applied to any object label but not to classifications.

To create a Relation attribute, enable the Relation option when adding an attribute during Ontology setup. By default, it is named #relation.

Objects are linked in the Label Editor during annotation, not during Ontology creation.

Using Relation attributes in the Label Editor:

Once an Ontology with Relation attributes has been set up, instances can be linked in the Label Editor during annotation.

  1. Create both instance labels. In this example a chicken and its wing have been labeled using bounding boxes.

  2. Click the Edit attributes button for the object with the Relation attribute - in this example the chicken wing.

  1. Click the Set relation… bar and select the instance you want to link the selected instance to. In this example the chicken and the wing appear on the same frame, and therefore appear under the This frame heading. Instances in different frames appear under the heading Rest.
  1. Click Done. The instances are now linked. This is shown in the Instance labels section with the name of the linked instance being displayed.

Apply to new occurrences

The Apply to new occurrences checkbox appears on the first instance of a label with a dynamic attribute. When selected, it applies the attribute value to all future labels of that instance.

The Apply to new occurrences functionality also holds for instance labels created automatically using interpolation.

Transcript Attributes

Transcript attributes are text fields for transcribing audio. Apply them to Audio Region objects and enter the transcription directly. For example, an Audio Region object called “Beautiful Voice” might use a Transcript attribute named “Lyrics” to transcribe song lyrics.

Only Text attributes can be marked Transcript

JSON Ontology Structure

You can preview a JSON of your Ontology structure when you are setting up or editing your Ontology. Preview the JSON by enabling the Display JSON toggle.

Ontology Best Practices

Creating an Ontology is a crucial step in developing effective machine learning applications. Keep the following considerations in mind when designing your Ontologies:

  • The Problem Domain: Ensure your Ontology is exhaustive, with a class or representation for all important concepts. Consider the appropriate level of detail. For example, an application recognizing various animals might have top-level classes like “cat” and “dog,” while one focused on dog breeds might use “German Shepherd” and “Border Collie” as top-level classes.

  • The Team: Use terminology that is clear and communicable across your entire team, including annotators, reviewers, project managers, algorithm developers, and other stakeholders.

  • The Workflow: Annotation can be difficult and time-consuming. Design your Ontology to represent classes and their attributes appropriately, but also aim for efficiency. Ensuring objects and scenes can be labeled both accurately and quickly will lead to a more efficient labeling process.