Table of Contents

Ontology overview

Alex Cota Updated by Alex Cota

A clean, thoughtful ontology is critical for creating high-quality labeled data with minimal errors and inconsistencies. The ontology contains the objects and classifications for labeling the data in a specific project.

Labelbox provides you with the following set of customizable entities for you to create your ontology (must contain at least one):

Objects

Classifications

Note: Objects can have nested classifications.

Open the API explorer and run the following query to get the ontology for one of your projects.

query { 
project (where: {id: "<PROJECT_ID>"}) {
ontology {
normalized
}
}
}

Fields

When you run this query, the result will contain the following values.

tools

Top-level JSON key designated for vector and mask Features. Objects under tools may contain subclassifications. Annotations created with tools become “Objects”.

classifications

Top-level JSON key designated for global classifications. Classifications may contain subclassifications.

schemaNodeId

A schema node contains all of the information regarding the parents, children, and structure of the ontology.

featureSchemaId

A feature schema contains all of the necessary information for rendering a Feature of its kind such as name, color, and type.

name

Name of the object or classification as defined in the ontology.

color

Color of the mask or vector feature on the asset.

tool

Bounding box, polygon, polyline, point, or segmentation mask tool used to create annotations.

instructions

Text that appears as the classification question to the labeler.

type

Classification type (radio, checklist, text, or dropdown)

options

Possible classification answers.

label

Text that appears to the labeler as a possible answer to the classification question.

value

Value of the classification answer.

required

Indicates whether the object requires use or the classification question requires an answer.

Sample ontology

{ 
"tools": [
{
"schemaNodeId": "ck5cxrgenqzi00899gfrggvr4",
"featureSchemaId": "ck5cxrgdxjepy0952ttth9a96",
"required": false,
"name": "Dog",
"color": "#FF0000",
"tool": "rectangle",
"classifications": []
}
],
"classifications": [
{
"schemaNodeId": "ck62vcr24s79h08337bijdab3",
"featureSchemaId": "ck62vcr1es78x0833r1uxg6jz",
"required": true,
"instructions": "This is a question.",
"name": "this_is_a_question.",
"type": "radio",
"options": [
{
"schemaNodeId": "ck62vcr0d0be30876ojpf3qwf",
"featureSchemaId": "ck62vcqzo0go60700u048bzqv",
"label": "Yes",
"value": "yes"
},
{
"schemaNodeId": "ck62vcr0d0be40876uya7zei2",
"featureSchemaId": "ck62vcqzo0go70700v16eg61d",
"label": "No",
"value": "no"
}
]
}
]
}

Create or reuse ontologies

To learn how to reuse and modify ontologies programmatically, see our GraphQL docs on Ontologies.

Was this page helpful?

Create or reuse ontologies

Contact