Ango Import Format
Overview of the Ango Hub Label Import Format
Ango Hub allows administrators and project managers to import existing annotations. More on label import here.
In order to be imported to the platform, existing labels need to be converted to the Ango Hub Import Format. The following article will provide the format’s specifications, as well as examples of import files.
Quick Start
From the Label Set section of the Settings tab, create your project ontology (more information on how to do so here)
From the Assets tab, click on Import.

From the dialog that pops up, click on the Sample JSON toggle.

You will see a sample JSON pre-populated with a basic schema of the import file you need, including schema IDs and structure. You may use this sample as structure for your import JSON.
Read below for more information on how to complete the import file.
Warning for Video Pre-Annotations
Common Properties
External ID
The external ID identifies assets in projects.
When importing assets through the browser, the external ID is assigned automatically, and is equal to the asset's filename. When importing using the Cloud Import function, administrators and project managers must assign this ID manually to each asset. More on importing assets to Ango Hub here.
The assets must be imported to Ango Hub before the annotations.
It is not currently possible to bulk upload both assets and annotations with a single import file.
The external ID of each asset can be viewed from the Assets tab of your project, under the External ID column.
External IDs do not have to be unique. You can have more than one asset with the same external ID.
Schema IDs
The Schema ID is a unique identifier for each labeling tool.
If you don't yet know the schema ID of the labeling tool you will use, instead of:
"schemaId": "my_schema_id"
you may use the tool's name (title) like so:
"title": "Name of My Tool"
This, however, is not recommended since Ango Hub will have to guess which tool you meant. If you have more than one tool with the same name, Ango Hub will pick one randomly.
To obtain each tool's schema ID, navigate to the Label Set section of the Settings. You will find it when expanding the details of each tool.

Create and save your project's label set before attempting to import labels.
Ensure the schema IDs in your import file match the ones in the Label Set section of your project's settings.
Nested classifications have their own, separate Schema IDs. They do not inherit the Schema ID of their parent class.
Object ID
By default, all objects (annotations) created on Ango Hub, either directly from the platform or by importing them, get assigned a random Object ID used to identify them uniquely.
You may, however, choose to assign a custom object ID to annotations you are importing. This is useful (and necessary) in a number of cases:
In video annotations, the object ID allows you to move and track the same annotation between frames.
In single and group relations, the Object ID is necessary to relate annotations to one another.
Assigning an object ID manually means that Ango Hub will not create one for the object in question.
To add an object ID to any object you are importing, simply add the following line to your object:
"objectId": "<YOUR_OBJECT_ID>"
For example, a PDF area object with a custom object ID would look like this:
{
"title": "box2",
"bounding-box": {
"height": 1200,
"width": 800,
"x1": 98.2109375,
"y1": 253.6640625,
"x2": 342.2109375,
"y2": 567.6640625,
"pageNumber": 2,
"text": "Second Text",
"objectId": "1234567890"
}
}
You can add custom Object IDs to all annotation types.
Lock
You can lock certain annotations so that annotators cannot edit them. To do so, simply add "lock":true
as a property to an object. For example:
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
},
"lock": true
}
]
}
]
Lock is available for all annotation types, including classifications, except relations. We plan on supporting locking relations soon.
Metadata
Add the description metadata to the tools
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
},
"metadata": {
"description": "Sample Annotation"
}
}
]
}
]
Add the description metadata to the classifications
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "97e1dfeffc6228423aa3007",
"answer": "Green",
"metadata": {
"description": "Sample annotation"
}
}
]
}
]
Page
The "page" field is essential for determining which specific page of an asset the objects should be added to. This field is particularly important when working with assets that contain multiple frames or pages, such as videos, multi-image assets, and DICOM images.
[
{
"externalId": "example.tiff",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 6,
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
}
}
]
}
]
All annotations on DICOM files, regardless of whether the DICOMs are single- or multi-frame, need the page
property.
For single-frame DICOM annotations, the page
property needs to be equal to 0.
For example:
bbox_obj = {
"schemaId": schema_id,
"page": 0,
"bounding-box": {
"x": x,
"y": y,
"width": w,
"height": h
}
}
Tools
Bounding Box
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
}
},
{
"schemaId": "09f90db83b842d7bf0c2225",
"bounding-box": {
"x": 56,
"y": 56,
"width": 67,
"height": 44
}
}
]
}
]
Bounding Box with OCR Text
You may include OCR information such that, when imported, if in the category schema, the "Targeted OCR" toggle was enabled for the bounding box tool:

then you may add the "ocr" field to the bounding box to import, as pre-labels, the OCR contents. Here is an example JSON with the OCR field:
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
},
"ocr": {
"text": "The Quick Brown Fox"
}
},
{
"schemaId": "09f90db83b842d7bf0c2225",
"bounding-box": {
"x": 56,
"y": 56,
"width": 67,
"height": 44
},
"ocr": {
"text": "Jumps Over The Lazy Dog"
}
}
]
}
]
Rotated Bounding Box
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "678717a10e50d6563edf230",
"title": "Bottom",
"rotated-bounding-box": {
"width": 100,
"height": 100,
"x": 200,
"y": 200,
"rotation": 45
}
},
{
"schemaId": "c9d96c7f6b863df8dc88790",
"title": "Right",
"rotated-bounding-box": {
"width": 100,
"height": 100,
"x": 200,
"y": 200,
"rotation": -45
}
},
{
"schemaId": "205ae9eb900f7ca929dd497",
"title": "Top",
"rotated-bounding-box": {
"width": 100,
"height": 100,
"x": 200,
"y": 200,
"rotation": -135
}
},
{
"schemaId": "23921c9aa563f1257253471",
"title": "Left",
"rotated-bounding-box": {
"width": 100,
"height": 100,
"x": 200,
"y": 200,
"rotation": 135
}
}
]
}
]
Rotated Bounding Box Angles

Polygon
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "3db073f1a9deba207b65123",
"polygon": [
[
118,
459
],
[
299,
327
],
[
479,
459
],
[
411,
672
],
[
187,
671
]
]
},
{
"schemaId": "3db073f1a9deba207b65123",
"polygon": [
[
534,
345
],
[
656,
678
],
[
843,
675
],
[
978,
234
],
[
848,
345
]
]
}
]
}
]
Polyline
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "7e8475173033ca753606470",
"polyline": [
[
128,
128
],
[
128,
256
],
[
256,
320
]
]
}
]
}
]
Spline
[
{
"externalId": "example.png",
"tools": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"spline": [
[
120,
80,
5,
0
],
[
240,
160,
5.4,
0
],
[
280,
240,
6.4,
1
]
]
}
]
}
]
The first value being the X distance in pixels from the left, the second the Y distance in pixels from the top, the third the width of the spline at that point, and the fourth whether or not the point was marked or not.
Segmentation
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "2ff45d51337052241bcb680",
"segmentation": {
"zones": [
{
"region": [
[
64,
64
],
[
64,
156
],
[
156,
156
],
[
156,
64
]
],
"holes": []
},
{
"region": [
[
64,
256
],
[
64,
360
],
[
256,
360
],
[
320,
256
]
],
"holes": [
[
[
100,
270
],
[
140,
270
],
[
140,
320
]
],
[
[
200,
300
],
[
240,
300
],
[
240,
350
],
[
200,
350
]
]
]
}
]
}
}
]
}
]
Entity
Audio Labeling
[
{
"externalId": "example.mp3",
"objects": [
{
"schemaId": "6ab93a0c0c3553e5b598887",
"ner": {
"start": 2.18,
"end": 3.36
}
},
{
"schemaId": "6ab93a0c0c3553e5b598887",
"ner": {
"start": 6.7,
"end": 8.1
}
}
]
}
]
Text Labeling
[
{
"externalId": "example.txt",
"objects": [
{
"schemaId": "6ab93a0c0c3553e5b598887",
"ner": {
"start": 6,
"end": 10,
"selection": "ipsum"
}
},
{
"schemaId": "6ab93a0c0c3553e5b598887",
"ner": {
"start": 28,
"end": 38,
"selection": "consectetur"
}
}
]
}
]
Point
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "63f2ca2a1e5404f14f14039",
"point": [
64,
64
]
},
{
"schemaId": "63f2ca2a1e5404f14f14039",
"point": [
256,
64
]
},
{
"schemaId": "63f2ca2a1e5404f14f14039",
"point": [
64,
256
]
},
{
"schemaId": "63f2ca2a1e5404f14f14039",
"point": [
256,
256
]
}
]
}
]
PDF
[
{
"externalId": "example.pdf",
"objects": [
{
"schemaId": "a95b7523d9d5e523aade085",
"pdf": {
"height": 384,
"width": 384,
"x1": 64,
"y1": 64,
"x2": 128,
"y2": 128,
"pageNumber": 1,
"text": "sample text"
}
}
]
}
]
Brush
Brush
For how to import brush traces with the brush tool, refer to the following page.
Medical Brush
For how to import brush traces with the medical brush tool, refer to the following page.
Tools + Nested Classifications
Bounding Box / Radio
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "c72440f85fecbd439bca284",
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
},
"classifications": [
{
"schemaId": "a7800ce15dcae82c8d51463",
"answer": "Black"
}
]
},
{
"schemaId": "c72440f85fecbd439bca284",
"bounding-box": {
"x": 56,
"y": 56,
"width": 67,
"height": 44
},
"classifications": [
{
"schemaId": "a7800ce15dcae82c8d51463",
"answer": "Yellow"
}
]
}
]
}
]
Video and Multi-Image Labeling
Video Labeling (v1)
Video labeling is functionally the same as image labeling, with the only difference being that we add an extra page property to indicate the frame to which the annotation belongs.
Additionally, you may add an "interpolationStopped": true
object as shown below to make an annotation disappear from the asset at a specific frame. You may then make it reappear by indicating the same objectId
and using "interpolationStopped": false
.
[
{
"externalId": "example.mp4",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 5,
"objectId": "12345",
"bounding-box": {
"x": 100,
"y": 166,
"width": 66,
"height": 61
}
},
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 20,
"objectId": "12345",
"bounding-box": {
"x": 200,
"y": 266,
"width": 66,
"height": 61
}
},
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 35,
"objectId": "12345",
"bounding-box": {
"x": 300,
"y": 166,
"width": 66,
"height": 61
}
},
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 36,
"objectId": "12345",
"interpolationStopped": true
}
]
}
]
Video Labeling (v2)
[
{
"externalId": "example.mp4",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"objectId": "12345",
"segments": [0, 60],
"outOfViewSegments": [[20, 25], [45, 50]],
"customColorIntervals": [
{
"interval": [
5,
15
],
"color": "#ffff00"
}
]
"keyFrames": {
"5": {
"bounding-box": {
"x": 50,
"y": 100,
"height": 200,
"width": 400
}
},
"15": {
"bounding-box": {
"x": 200,
"y": 100,
"height": 200,
"width": 400
}
},
"40": {
"bounding-box": {
"x": 200,
"y": 400,
"height": 200,
"width": 400
}
}
}
}
]
}
]
Multi-Image Labeling
Importing annotations for multi-image assets is functionally the same as importing video annotations, with each "image" being a page. Pages start from 0.
[
{
"externalId": "example.tiff",
"objects": [
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 6,
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
}
},
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 7,
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
}
},
{
"schemaId": "09f90db83b842d7bf0c2225",
"page": 8,
"bounding-box": {
"x": 192,
"y": 166,
"width": 66,
"height": 61
}
}
]
}
]
Classifications
Radio
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "97e1dfeffc6228423aa3007",
"answer": "Green"
}
]
}
]
Checkbox
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "5080b746a37f41d3fc89933",
"answer": ["Green", "Red"]
}
]
}
]
Single-Select Dropdown
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "b12539e62f749ac59372624",
"answer": "Green"
}
]
}
]
Multi-Select Dropdown
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "9096a7b7d5cbd2057bb9356",
"answer": ["Green", "Red"]
}
]
}
]
Single-Select Tree
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "27b16368a548b90d7169967",
"answer": "Trunk / Branch 2 / Leaf 2"
}
]
}
]
Multi-Select Tree
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "7fb05854b6b28ff05a4e227",
"answer": [
"Trunk",
"Trunk / Branch 2",
"Trunk / Branch 1 / Leaf 1",
"Trunk / Branch 2 / Leaf 2"
]
}
]
}
]
Text
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "a9c72798e9cfb6ad9ab4364",
"answer": "Green"
}
]
}
]
Nested Classifications
Radio / Radio / Radio
[
{
"externalId": "example.png",
"classifications": [
{
"schemaId": "905d68fb647890538d5a469",
"answer": "A",
"classifications": [
{
"schemaId": "00298d59fb1e305a771a603",
"answer": "A1",
"classifications": [
{
"schemaId": "403a2c4d4069ebbca375452",
"answer": "A1-1"
}
]
}
]
}
]
}
]
Video and Multi-Image Labeling
Please ensure the "Frame-specific" flag is enabled to add classification labels to each frame, and the "Multiple" flag is enabled to add multiple classification labels for an asset.

Video Labeling (v1)
[
{
"externalId": "example.mp4",
"classifications": [
{
"schemaId": "5570fff8bbe9a7d2e7cb117",
"objectId": "12345",
"answer": "Green",
"page": 3
},
{
"schemaId": "5570fff8bbe9a7d2e7cb117",
"objectId": "12345",
"answer": "Red",
"page": 6
},
{
"schemaId": "5570fff8bbe9a7d2e7cb117",
"objectId": "12345",
"page": 10,
"answer": {"interpolationStopped": true}
}
]
}
]
Video Labeling (v2)
[
{
"externalId": "example.mp4",
"classifications": [
{
"schemaId": "5570fff8bbe9a7d2e7cb117",
"objectId": "12345",
"segments": [0, 60],
"outOfViewSegments": [[20, 25], [45, 50]],
"keyFrames": {
"5": {
"answer": "Green"
},
"15": {
"answer": "Red"
},
"40": {
"answer": "Blue"
}
}
}
],
"objects": [],
"relations": []
}
]
Multi-Image Labeling
[
{
"externalId": "example",
"classifications": [
{
"schemaId": "5570fff8bbe9a7d2e7cb117",
"objectId": "12345",
"answer": "Green",
"page": 3
},
{
"schemaId": "5570fff8bbe9a7d2e7cb117",
"objectId": "12345",
"answer": "Red",
"page": 6
},
{
"schemaId": "5570fff8bbe9a7d2e7cb117",
"objectId": "67890",
"answer": "Red",
"page": 6
}
]
}
]
Relations
Single
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "e29868a0f61c679133fe505",
"objectId": "100001",
"bounding-box": {
"width": 128,
"height": 128,
"x": 64,
"y": 192
}
},
{
"schemaId": "e29868a0f61c679133fe505",
"objectId": "100002",
"bounding-box": {
"width": 128,
"height": 128,
"x": 320,
"y": 192
}
}
],
"relations": [
{
"schemaId": "c344baf6021ac976cd3f509",
"direction": "straight",
"from": "100001",
"to": "100002"
}
]
}
]
Group
[
{
"externalId": "example.png",
"objects": [
{
"schemaId": "14b0745eb3fd0fb920a0664",
"objectId": "10001",
"bounding-box": {
"width": 128,
"height": 128,
"x": 64,
"y": 64
}
},
{
"schemaId": "14b0745eb3fd0fb920a0664",
"objectId": "10002",
"bounding-box": {
"width": 128,
"height": 128,
"x": 320,
"y": 64
}
},
{
"schemaId": "14b0745eb3fd0fb920a0664",
"objectId": "10003",
"bounding-box": {
"width": 128,
"height": 128,
"x": 192,
"y": 256
}
}
],
"relations": [
{
"schemaId": "6261613fab7418ef20b0243",
"group": [
"10001",
"10002",
"10003"
]
}
]
}
]
Last updated