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

circle-info

When importing pre-annotations to a Video V2 asset, you must specify the file extension.

This means that if you are attempting to import the pre-annotations using only the externald field, then the asset's externalID must contain the file's correct extension. For example:

Copy

If you are using the "data" field, alone or together with the externalId field, then at least the data field must contain the full filename, including the file extension:

Copy

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.

circle-exclamation

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.

circle-info

It is possible to import annotations referencing assets with only their external IDs, as in many exampled below. In this situation, all assets sharing the same external ID will be pre-labeled.

Schema IDs

The Schema ID is a unique identifier for each labeling tool.

circle-exclamation

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.

circle-exclamation

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.

circle-info

Ango Hub will not check nor warn you if you import multiple, different annotations with the same object ID in the same asset or, in the case of videos, in the same frame.

Using the same object ID on more than one object in the same frame can cause unexpected behavior, and may break functionality such as relations.

Unless this is by design, such as tracking an annotation between video frames, always ensure your object IDs are unique to prevent unexpected behaviors.

To add an object ID to any object you are importing, simply add the following line to your object:

For example, a PDF area object with a custom object ID would look like this:

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:

chevron-rightSample Category Schemahashtag

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

chevron-rightSample Category Schemahashtag
  • Add the description metadata to the classifications

chevron-rightSample Category Schemahashtag

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.

chevron-rightSample Category Schemahashtag
circle-exclamation

Tools

Bounding Box

circle-info

x and y refer to the coordinates of the bounding box's top-left corner.

chevron-rightSample Category Schemahashtag

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:

chevron-rightSample Category Schemahashtag

3D Bounding Box

chevron-rightSample Category Schemahashtag

Rotated Bounding Box

chevron-rightSample Category Schemahashtag

Rotated Bounding Box Angles

Rotated Bounding Box Angles

Polygon

chevron-rightSample Category Schemahashtag

Polyline

chevron-rightSample Category Schemahashtag

3D Polyline

chevron-rightSample Category Schemahashtag

Spline

chevron-rightSample Category Schemahashtag

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

circle-info

Segmentations are composed of instances, zones, regions, and holes.

An instance may contain more than one zone. One zone contains exactly one region. A region can contain more than one hole.

Each of the points composing the segmentation is represented as an X/Y coordinate pair. For more information on how X/Y pairs work in the Ango Annotation Format, check out this section. For the way Ango Hub exports segmentation labels, check out this page.

chevron-rightSample Category Schemahashtag

Entity

Audio Labeling

circle-info

The start and end properties refer to the seconds elapsed since the start of the audio file.

chevron-rightSample Category Schemahashtag
file-download
119KB

Text Labeling

circle-info

The start and end properties refer to the character indices of the entity.

circle-info

The "selection" field is optional for text entities and it is required only to appear on export.

chevron-rightSample Category Schemahashtag
file-download
445B

Point

chevron-rightSample Category Schemahashtag

PDF

circle-info

height and width refer to the dimensions of the relevant page of the pdf file.

chevron-rightSample Category Schemahashtag
file-pdf
1KB

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

chevron-rightSample Category Schemahashtag

Video and Multi-Image Labeling

Video Labeling (v2)

circle-info

If you’re unsure which video tool you are currently using, refer to the Video V2 Breaking Changes and Transition page for clarification.

chevron-rightSample Category Schemahashtag

Customize Timeline Color

It is also possible to customize the color of a specific interval in the video timeline as follows:

chevron-rightSample Category Schemahashtag

Video Labeling (v1)

circle-info

If you’re unsure which video tool you are currently using, refer to the Video V2 Breaking Changes and Transition page for clarification.

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.

circle-info

"interpolationStopped" field is necessary to stop the linear interpolation of the bounding boxes across the video.

chevron-rightSample Category Schemahashtag

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.

chevron-rightSample Category Schemahashtag

Classifications

Radio

chevron-rightSample Category Schemahashtag

Checkbox

chevron-rightSample Category Schemahashtag

Single-Select Dropdown

chevron-rightSample Category Schemahashtag

Multi-Select Dropdown

chevron-rightSample Category Schemahashtag

Single-Select Tree

chevron-rightSample Category Schemahashtag

Multi-Select Tree

chevron-rightSample Category Schemahashtag

Text

chevron-rightSample Category Schemahashtag

Nested Classifications

Radio / Radio / Radio

chevron-rightSample Category Schemahashtag

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 (v2)

circle-info

If you’re unsure which video tool you are currently using, refer to the Video V2 Breaking Changes and Transition page for clarification.

chevron-rightSample Category Schemahashtag

Customize Timeline Color

It is also possible to customize the color of a specific interval in the video timeline as follows:

chevron-rightSample Category Schemahashtag

Video Labeling (v1)

circle-info

If you’re unsure which video tool you are currently using, refer to the Video V2 Breaking Changes and Transition page for clarification.

chevron-rightSample Category Schemahashtag

Multi-Image Labeling

chevron-rightSample Category Schemahashtag

Relations

Single

circle-info

Direction Options: "straight", "reverse", "bidirectional"

chevron-rightSample Category Schemahashtag

Group

chevron-rightSample Category Schemahashtag

Last updated