> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/data/importing-and-exporting-annotations/importing-annotations/ango-import-format.md).

# Ango Import Format

Overview of the Ango Hub Label Import Format

<figure><picture><source srcset="https://angohub-docs-assets.s3.eu-central-1.amazonaws.com/cover/ango-import-format-dark.png" media="(prefers-color-scheme: dark)"><img src="https://angohub-docs-assets.s3.eu-central-1.amazonaws.com/cover/ango-import-format.png" alt=""></picture><figcaption></figcaption></figure>

Ango Hub allows administrators and project managers to import existing annotations. 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.

## Common Properties

#### External ID

The [external ID](https://docs.imerit.net/core-concepts/assets.md#External-ID) identifies assets in projects.

* When [importing assets through the browser](https://docs.imerit.net/data/importing-assets/asset-browser-import.md), the external ID is assigned automatically, and is equal to the asset's filename.
* When importing using the [Cloud Import](https://docs.imerit.net/data/importing-assets/asset-cloud-import.md) function, administrators and project managers must assign this ID manually to each asset. [More on importing assets to Ango Hub here.](https://docs.imerit.net/data/importing-assets.md)

{% hint style="info" %}
The external ID of each asset can be viewed from the *Assets* tab of your project, under the *External ID* column.
{% endhint %}

{% hint style="warning" %}
External IDs are not required to be unique, meaning that multiple assets can share the same external ID.

When importing annotations, assets can be referenced solely by their external IDs, as demonstrated in the examples below. In such cases, the annotations will be imported into all assets sharing the specified external ID.
{% endhint %}

#### Title and Schema ID

Ango Hub supports two properties for identifying annotation classes when importing annotations: <kbd>title</kbd> and <kbd>schemaId</kbd>. These properties are used to associate imported annotations with their corresponding tools, classifications, or relations defined in the project's label set.

You can use either <kbd>title</kbd>, <kbd>schemaId</kbd>, or both when preparing an Ango import file.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FJRALus2qhnA5hcBHek2A%2Fimage.png?alt=media&amp;token=f5863048-5092-4db7-acd0-62a09f10094a" alt=""><figcaption></figcaption></figure>

The <kbd>title</kbd> property identifies an annotation class by its name as defined in the project's label set. Using titles makes the import file more human-readable and easier to prepare manually, without requiring users to retrieve the Schema ID of each annotation class.

The <kbd>schemaId</kbd> property identifies an annotation class by its unique identifier in the project's label set. Using Schema IDs ensures that imported annotations are associated with the intended annotation classes, even when multiple classes share the same title.&#x20;

{% hint style="danger" %}
If multiple tools in the project's label set share the same title, Ango Hub will randomly select one of them when importing annotations by title. To avoid ambiguity and ensure that annotations are associated with the intended tool, use the <kbd>schemaId</kbd> property instead.
{% endhint %}

{% hint style="info" %}
Nested classifications have their own, separate Schema IDs. They do not inherit the Schema ID of their parent class.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Vehicle",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            },
            {
                "title": "Vehicle",
                "bounding-box": {
                    "x": 56,
                    "y": 56,
                    "width": 67,
                    "height": 44
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "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
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Title and Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Vehicle",
                "schemaId": "09f90db83b842d7bf0c2225",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            },
            {
                "title": "Vehicle",
                "schemaId": "09f90db83b842d7bf0c2225",
                "bounding-box": {
                    "x": 56,
                    "y": 56,
                    "width": 67,
                    "height": 44
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Vehicle",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

#### Object ID

By default, Ango Hub automatically generates a unique Object ID for every annotation, whether it is created directly on the platform or imported from an external source.

When importing annotations, you can assign custom Object IDs using the <kbd>objectId</kbd> property. This is particularly useful in the following scenarios:

* In video annotations, object IDs are used to identify and track the same object across multiple video frames.
* In single and group relations, Object IDs are required to establish relationships between annotations.

When a custom Object ID is provided, Ango Hub uses the specified value instead of generating one automatically.

{% hint style="info" %}
Object IDs must be unique within the same asset or, in the case of videos, within the same frame. Assigning the same Object ID to multiple annotations may cause unexpected behavior and disrupt functionality.

Only reuse an Object ID when intentionally referencing the same annotation across multiple video frames, such as for object tracking.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Vehicle",
                "objectId": "7f3a9c2e8b104d6fa5c821e9",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            },
            {
                "title": "Vehicle",
                "objectId": "4b8d1f6a9e203c7db2a540f1",
                "bounding-box": {
                    "x": 56,
                    "y": 56,
                    "width": 67,
                    "height": 44
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "09f90db83b842d7bf0c2225",
                "objectId": "7f3a9c2e8b104d6fa5c821e9",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            },
            {
                "schemaId": "09f90db83b842d7bf0c2225",
                "objectId": "4b8d1f6a9e203c7db2a540f1",
                "bounding-box": {
                    "x": 56,
                    "y": 56,
                    "width": 67,
                    "height": 44
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Vehicle",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

#### Lock

You can lock imported annotations to prevent annotators from modifying them. To lock an annotation, set its <kbd>lock</kbd> property to `true`.

{% hint style="info" %}
Annotation locking is supported for all annotation types, including classifications, except for relations.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Vehicle",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                },
                "lock": true
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "09f90db83b842d7bf0c2225",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                },
                "lock": true
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Vehicle",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

#### Metadata

You can attach additional descriptive information to annotations using the <kbd>metadata</kbd> property.

* Add the description metadata to the tools

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Vehicle",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                },
                "metadata": {
                    "description": "Sample Annotation"
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "09f90db83b842d7bf0c2225",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                },
                "metadata": {
                    "description": "Sample Annotation"
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Vehicle",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

* Add the description metadata to the classifications

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "title": "Color",
                "answer": "Green",
                "metadata": {
                    "description": "Sample annotation"
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "97e1dfeffc6228423aa3007",
                "answer": "Green",
                "metadata": {
                    "description": "Sample annotation"
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "radio",
      "required": false,
      "schemaId": "97e1dfeffc6228423aa3007",
      "frameSpecific": false,
      "classifications": [],
      "multiple": false,
      "options": [
        {
          "value": "Green",
          "schemaId": "98a48fa4a08513e2ed49621"
        },
        {
          "value": "Red",
          "schemaId": "78a1bb2814b65e53bfd4756"
        },
        {
          "value": "Blue",
          "schemaId": "b83883a9fdab443ab824195"
        },
        {
          "value": "Yellow",
          "schemaId": "423f7c7021445479e1fb016"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

#### Page

The <kbd>page</kbd> property specifies the page or frame of an asset to which an annotation should be added. It is particularly important when importing annotations into assets containing multiple pages or frames, such as multi-image assets and DICOM images.

{% hint style="info" %}
The <kbd>page</kbd> property is required for all annotations on DICOM assets, regardless of whether they are single-frame or multi-frame. For single-frame DICOM assets, the <kbd>page</kbd> property must be set to 0.
{% endhint %}

{% tabs %}
{% tab title="Single Image" icon="image" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Person",
                "schemaId": "09f90db83b842d7bf0c2225",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Multi-Image" icon="images" %}

```json
[
    {
        "externalId": "example",
        "objects": [
            {
                "title": "Person",
                "schemaId": "09f90db83b842d7bf0c2225",
                "page": 6,
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Single-Frame DICOM" icon="file-medical" %}

```json
[
    {
        "externalId": "example.dcm",
        "objects": [
            {
                "title": "Person",
                "schemaId": "09f90db83b842d7bf0c2225",
                "page": 0,
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Multi-Frame DICOM" icon="files-medical" %}

```json
[
    {
        "externalId": "example.dcm",
        "objects": [
            {
                "title": "Person",
                "schemaId": "09f90db83b842d7bf0c2225",
                "page": 6,
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Person",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

## Tools

### Bounding Box

{% hint style="info" %}
The <kbd>x</kbd> and <kbd>y</kbd> values represent the pixel coordinates of the bounding box’s top-left corner.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Car",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                }
            },
            {
                "title": "Car",
                "bounding-box": {
                    "x": 56,
                    "y": 56,
                    "width": 67,
                    "height": 44
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "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
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

#### 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:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FvJhApYMdFtccXewFLZZe%2Fimage.png?alt=media&amp;token=17836480-e814-4477-960a-1c3c8148ca5f" alt=""><figcaption></figcaption></figure>

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:

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Header",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                },
                "ocr": {
                    "text": "The Quick Brown Fox"
                }
            },
            {
                "title": "Header",
                "bounding-box": {
                    "x": 56,
                    "y": 56,
                    "width": 67,
                    "height": 44
                },
                "ocr": {
                    "text": "Jumps Over The Lazy Dog"
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "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"
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Header",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": true,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

#### 3D Bounding Box

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "title": "Lung",
                "bounding-box": {
                    "x1": 50,
                    "y1": 75,
                    "z1": 100,
                    "x2": 200,
                    "y2": 250,
                    "z2": 300
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "schemaId": "09f90db83b842d7bf0c2225",
                "bounding-box": {
                    "x1": 50,
                    "y1": 75,
                    "z1": 100,
                    "x2": 200,
                    "y2": 250,
                    "z2": 300
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Lung",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Rotated Bounding Box

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Bottom",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": 45
                }
            },
            {
                "title": "Right",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": -45
                }
            },
            {
                "title": "Top",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": -135
                }
            },
            {
                "title": "Left",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": 135
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "678717a10e50d6563edf230",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": 45
                }
            },
            {
                "schemaId": "c9d96c7f6b863df8dc88790",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": -45
                }
            },
            {
                "schemaId": "205ae9eb900f7ca929dd497",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": -135
                }
            },
            {
                "schemaId": "23921c9aa563f1257253471",
                "rotated-bounding-box": {
                    "width": 100,
                    "height": 100,
                    "x": 200,
                    "y": 200,
                    "rotation": 135
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Top",
      "tool": "rotated-bounding-box",
      "required": false,
      "schemaId": "205ae9eb900f7ca929dd497",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    },
    {
      "title": "Left",
      "tool": "rotated-bounding-box",
      "required": false,
      "schemaId": "23921c9aa563f1257253471",
      "classifications": [],
      "multiple": false,
      "color": "#03a9f4",
      "shortcutKey": "2"
    },
    {
      "title": "Bottom",
      "tool": "rotated-bounding-box",
      "required": false,
      "schemaId": "678717a10e50d6563edf230",
      "classifications": [],
      "multiple": false,
      "color": "#9c27b0",
      "shortcutKey": "3"
    },
    {
      "title": "Right",
      "tool": "rotated-bounding-box",
      "required": false,
      "schemaId": "c9d96c7f6b863df8dc88790",
      "classifications": [],
      "multiple": false,
      "color": "#673ab7",
      "shortcutKey": "4"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

##### Rotated Bounding Box Angles

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fv8GiOdrpsCtbJhOZLYqD%2Fimage.png?alt=media&amp;token=85b7bc08-7c94-4789-b8bc-c723375c9eba" alt="Rotated Bounding Box Angles" width="563"><figcaption><p>Rotated Bounding Box Angles</p></figcaption></figure>

#### 3D Rotated Bounding Box

{% hint style="info" %}

* The <kbd>center</kbd> property specifies the coordinates of the center of the bounding box along the X, Y, and Z axes.&#x20;
* The <kbd>size</kbd> property defines the width, height, and depth of the bounding box along its local coordinate axes before rotation is applied.&#x20;
* The <kbd>quaternion</kbd> property defines the orientation of the bounding box in three-dimensional space using four quaternion components.
  {% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "title": "Lung",
                "rotated-bounding-box": {
                    "center": [128, 128, 64],
                    "size": [25, 25, 35],
                    "quaternion": [0.5, 0, 0, 1]
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "schemaId": "ab34d90dca09b51bf8c8912",
                "rotated-bounding-box": {
                    "center": [128, 128, 64],
                    "size": [25, 25, 35],
                    "quaternion": [0.5, 0, 0, 1]
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "tool": "rotated-bounding-box",
      "color": "#f44336",
      "title": "Lung",
      "multiple": false,
      "required": false,
      "schemaId": "ab34d90dca09b51bf8c8912",
      "description": "",
      "shortcutKey": "1",
      "classifications": []
    }
  ],
  "relations": [],
  "classifications": []
}
```

</details>

### Polygon

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Car",
                "polygon": [
                    [118, 459],
                    [299, 327],
                    [479, 459],
                    [411, 672],
                    [187, 671]
                ]
            },
            {
                "title": "Car",
                "polygon": [
                    [534, 345],
                    [656, 678],
                    [843, 675],
                    [978, 234],
                    [848, 345]
                ]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "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]
                ]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "polygon",
      "required": false,
      "schemaId": "3db073f1a9deba207b65123",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Polyline

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Line",
                "polyline": [
                    [128, 128],
                    [128, 256],
                    [256, 320]
                ]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "7e8475173033ca753606470",
                "polyline": [
                    [128, 128],
                    [128, 256],
                    [256, 320]
                ]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Line",
      "tool": "polyline",
      "required": false,
      "schemaId": "7e8475173033ca753606470",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

#### 3D Polyline

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "title": "Line",
                "polyline": {
                    "x1": 150,
                    "y1": 100,
                    "z1": 200,
                    "x2": 300,
                    "y2": 200,
                    "z2": 400
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "schemaId": "7e8475173033ca753606470",
                "polyline": {
                    "x1": 150,
                    "y1": 100,
                    "z1": 200,
                    "x2": 300,
                    "y2": 200,
                    "z2": 400
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Line",
      "tool": "polyline",
      "required": false,
      "schemaId": "7e8475173033ca753606470",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Segmentation

{% hint style="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.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Sample",
                "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]
                                ]
                            ]
                        }
                    ]
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "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]
                                ]
                            ]
                        }
                    ]
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Sample",
      "tool": "segmentation",
      "required": false,
      "schemaId": "2ff45d51337052241bcb680",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Entity

#### Entity: Audio Labeling

{% hint style="info" %}
The `start` and `end` properties refer to the seconds elapsed since the start of the audio file.
{% endhint %}

{% hint style="info" %}
The optional `tier` property assigns the entity to a tier using a zero-based index (`0`–`4`). If `tier` is omitted, the entity is added to the default tier.
{% endhint %}

To import a transcript for each audio entity, add a nested Text classification to the Entity tool in your project's Category Schema. In the example below, this classification is named *Transcript*. Put the transcript text in its `answer` field inside the object's `classifications` array, alongside `ner`.

Replace both schema IDs in the example with the IDs from your project. The Entity tool and its nested *Transcript* classification have separate schema IDs.

{% hint style="info" %}
The optional `ner.selection` property contains the selection text shown in *Layered Text View*. It does not populate a nested *Transcript* classification, which is displayed in the *Segment List*.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.mp3",
        "objects": [
            {
                "title": "Sample Entity",
                "ner": {
                    "start": 2.18,
                    "end": 3.36
                },
                "classifications": [
                    {
                        "title": "Transcript",
                        "answer": "Sample text"
                    }
                ]
            },
            {
                "title": "Sample Entity",
                "ner": {
                    "start": 6.7,
                    "end": 8.1
                },
                "classifications": [
                    {
                        "title": "Transcript",
                        "answer": "More sample text"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.mp3",
        "objects": [
            {
                "schemaId": "6ab93a0c0c3553e5b598887",
                "ner": {
                    "start": 2.18,
                    "end": 3.36
                },
                "classifications": [
                    {
                        "schemaId": "9632695e7e1fcc887e33409",
                        "answer": "Sample text"
                    }
                ]
            },
            {
                "schemaId": "6ab93a0c0c3553e5b598887",
                "ner": {
                    "start": 6.7,
                    "end": 8.1
                },
                "classifications": [
                    {
                        "schemaId": "9632695e7e1fcc887e33409",
                        "answer": "More sample text"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Sample Entity",
      "tool": "ner",
      "required": false,
      "schemaId": "6ab93a0c0c3553e5b598887",
      "classifications": [
        {
          "title": "Transcript",
          "tool": "text",
          "required": false,
          "schemaId": "9632695e7e1fcc887e33409",
          "frameSpecific": false,
          "richText": false,
          "regex": "",
          "classifications": [],
          "multiple": false,
          "options": []
        }
      ],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

{% file src="/files/m0uzI6E45f2gZIzzCQWm" %}

#### Entity: Text Labeling

{% hint style="info" %}
The `start` and `end` properties refer to the character indices of the entity.
{% endhint %}

{% hint style="info" %}
The `"selection"` field is optional for text entities and it is required only to appear on export.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.txt",
        "objects": [
            {
                "title": "Sample Entity",
                "ner": {
                    "start": 6,
                    "end": 10,
                    "selection": "ipsum"
                }
            },
            {
                "title": "Sample Entity",
                "ner": {
                    "start": 28,
                    "end": 38,
                    "selection": "consectetur"
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.txt",
        "objects": [
            {
                "schemaId": "6ab93a0c0c3553e5b598887",
                "ner": {
                    "start": 6,
                    "end": 10,
                    "selection": "ipsum"
                }
            },
            {
                "schemaId": "6ab93a0c0c3553e5b598887",
                "ner": {
                    "start": 28,
                    "end": 38,
                    "selection": "consectetur"
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Sample Entity",
      "tool": "ner",
      "required": false,
      "schemaId": "6ab93a0c0c3553e5b598887",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

{% file src="/files/yWfNjwzKsPd3xZCKUGtJ" %}

#### Entity: Video Labeling

{% hint style="info" %}
The `start` and `end` properties refer to the seconds elapsed since the start of the video file.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.mp4",
        "objects": [
            {
                "title": "Sample Entity",
                "ner": {
                    "start": 2.18,
                    "end": 3.36
                }
            },
            {
                "title": "Sample Entity",
                "ner": {
                    "start": 6.7,
                    "end": 8.1
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.mp4",
        "objects": [
            {
                "schemaId": "6ab93a0c0c3553e5b598887",
                "ner": {
                    "start": 2.18,
                    "end": 3.36
                }
            },
            {
                "schemaId": "6ab93a0c0c3553e5b598887",
                "ner": {
                    "start": 6.7,
                    "end": 8.1
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Sample Entity",
      "tool": "ner",
      "required": false,
      "schemaId": "6ab93a0c0c3553e5b598887",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Point

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Point",
                "point": [64, 64]
            },
            {
                "title": "Point",
                "point": [256, 64]
            },
            {
                "title": "Point",
                "point": [64, 256]
            },
            {
                "title": "Point",
                "point": [256, 256]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "63f2ca2a1e5404f14f14039",
                "point": [64, 64]
            },
            {
                "schemaId": "63f2ca2a1e5404f14f14039",
                "point": [256, 64]
            },
            {
                "schemaId": "63f2ca2a1e5404f14f14039",
                "point": [64, 256]
            },
            {
                "schemaId": "63f2ca2a1e5404f14f14039",
                "point": [256, 256]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Point",
      "tool": "point",
      "required": false,
      "schemaId": "63f2ca2a1e5404f14f14039",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Circle

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Ball",
                "circle": [
                    [80, 200],
                    [400, 250],
                    [250, 64]
                ]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "ec78ab1b08f55e9e2e97213",
                "circle": [
                    [80, 200],
                    [400, 250],
                    [250, 64]
                ]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "schemaId": "ec78ab1b08f55e9e2e97213",
      "tool": "circle",
      "title": "Ball",
      "required": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### PDF

{% hint style="info" %}
`height` and `width` refer to the dimensions of the relevant page of the pdf file.
{% endhint %}

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.pdf",
        "objects": [
            {
                "title": "Paragraph",
                "pdf": {
                    "height": 384,
                    "width": 384,
                    "x1": 64,
                    "y1": 64,
                    "x2": 128,
                    "y2": 128,
                    "pageNumber": 1,
                    "text": "sample text"
                }
            } 
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.pdf",
        "objects": [
            {
                "schemaId": "a95b7523d9d5e523aade085",
                "pdf": {
                    "height": 384,
                    "width": 384,
                    "x1": 64,
                    "y1": 64,
                    "x2": 128,
                    "y2": 128,
                    "pageNumber": 1,
                    "text": "sample text"
                }
            } 
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Paragraph",
      "tool": "pdf",
      "required": false,
      "schemaId": "a95b7523d9d5e523aade085",
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

{% file src="/files/16NNuoMdk1VSv3PlEXrg" %}

### Brush

#### Brush

For how to import brush traces with the brush tool, refer to the following [page](https://docs.imerit.net/data/importing-and-exporting-annotations/importing-annotations/importing-brush-traces.md).

#### Medical Brush

For how to import brush traces with the medical brush tool, refer to the following [page](https://docs.imerit.net/data/importing-and-exporting-annotations/importing-annotations/importing-nrrd-annotations.md).

### Message

<details>

<summary>Sample Message Asset</summary>

```json
[
    {
        "externalId": "example-chat-asset",
        "messages": [
            {
                "id": "1",
                "content": "Content of message 1",
                "user": {
                    "role": "user",
                    "id": "100001",
                    "label": "Human"
                }
            },
            {
                "id": "2",
                "content": "Content of message 2",
                "user": {
                    "role": "assistant",
                    "id": "100002",
                    "label": "AI"
                }
            }
        ]
    }
]
```

</details>

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example-chat-asset",
        "objects": [
            {
                "message": "1",
                "title": "Message",
                "classifications": [
                    {
                        "title": "Sentiment",
                        "answer": "Positive"
                    }
                ]
            },
            {
                "message": "2",
                "title": "Message",
                "classifications": [
                    {
                        "title": "Sentiment",
                        "answer": "Neutral"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example-chat-asset",
        "objects": [
            {
                "message": "1",
                "schemaId": "83e243f743bde31861ca899",
                "classifications": [
                    {
                        "schemaId": "92a2f5ed57edcd1ce440338",
                        "answer": "Positive"
                    }
                ]
            },
            {
                "message": "2",
                "schemaId": "83e243f743bde31861ca899",
                "classifications": [
                    {
                        "schemaId": "92a2f5ed57edcd1ce440338",
                        "answer": "Neutral"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "schemaId": "83e243f743bde31861ca899",
      "tool": "message",
      "title": "Message",
      "required": false,
      "classifications": [
        {
          "schemaId": "92a2f5ed57edcd1ce440338",
          "tool": "radio",
          "title": "Sentiment",
          "required": false,
          "classifications": [],
          "multiple": false,
          "options": [
            {
              "value": "Positive",
              "schemaId": "34a4303c7d79aff4c657701"
            },
            {
              "value": "Neutral",
              "schemaId": "8e46bd25a1d89a2e99d3683"
            },
            {
              "value": "Negative",
              "schemaId": "504eb4a2f8f173ab11d2542"
            }
          ],
          "parentToolType": "message",
          "parentToolId": "83e243f743bde31861ca899",
          "shortcutKey": "2",
          "frameSpecific": false
        }
      ],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Angle

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "title": "Angle",
                "angle": {
                    "vertex": [64, 128, 0],
                    "p1": [128, 128, 0],
                    "p2": [128, 256, 0]
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.nrrd",
        "objects": [
            {
                "schemaId": "b59dd60048b2efbb63c4226",
                "angle": {
                    "vertex": [64, 128, 0],
                    "p1": [128, 128, 0],
                    "p2": [128, 256, 0]
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "schemaId": "b59dd60048b2efbb63c4226",
      "tool": "angle",
      "title": "Angle",
      "required": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Skeleton

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Skeleton",
                "skeleton": {
                    "nodes": [
                        {
                            "id": "2d0b31e36fc36ab7c8b8255",
                            "x": 237.701,
                            "y": 93.92,
                            "occluded": false
                        },
                        {
                            "id": "d241121647111766e19c743",
                            "x": 238.806,
                            "y": 151.379,
                            "occluded": false
                        },
                        {
                            "id": "6db8e6f91a9efc803f05004",
                            "x": 196.817,
                            "y": 192.815,
                            "occluded": false
                        },
                        {
                            "id": "d6df89cc9917e1641537667",
                            "x": 280.795,
                            "y": 193.92,
                            "occluded": false
                        }
                    ],
                    "edges": [
                        {
                            "id": "5abdfe2f38da9f859ea5275",
                            "from": "2d0b31e36fc36ab7c8b8255",
                            "to": "d241121647111766e19c743",
                            "occluded": false
                        },
                        {
                            "id": "99652b301b58111d86fb802",
                            "from": "d241121647111766e19c743",
                            "to": "6db8e6f91a9efc803f05004",
                            "occluded": false
                        },
                        {
                            "id": "78d167d96c6c1d9773d1651",
                            "from": "d241121647111766e19c743",
                            "to": "d6df89cc9917e1641537667",
                            "occluded": false
                        }
                    ]
                }
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "schemaId": "b233269571ca360af279958",
                "skeleton": {
                    "nodes": [
                        {
                            "id": "2d0b31e36fc36ab7c8b8255",
                            "x": 237.701,
                            "y": 93.92,
                            "occluded": false
                        },
                        {
                            "id": "d241121647111766e19c743",
                            "x": 238.806,
                            "y": 151.379,
                            "occluded": false
                        },
                        {
                            "id": "6db8e6f91a9efc803f05004",
                            "x": 196.817,
                            "y": 192.815,
                            "occluded": false
                        },
                        {
                            "id": "d6df89cc9917e1641537667",
                            "x": 280.795,
                            "y": 193.92,
                            "occluded": false
                        }
                    ],
                    "edges": [
                        {
                            "id": "5abdfe2f38da9f859ea5275",
                            "from": "2d0b31e36fc36ab7c8b8255",
                            "to": "d241121647111766e19c743",
                            "occluded": false
                        },
                        {
                            "id": "99652b301b58111d86fb802",
                            "from": "d241121647111766e19c743",
                            "to": "6db8e6f91a9efc803f05004",
                            "occluded": false
                        },
                        {
                            "id": "78d167d96c6c1d9773d1651",
                            "from": "d241121647111766e19c743",
                            "to": "d6df89cc9917e1641537667",
                            "occluded": false
                        }
                    ]
                }
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "schemaId": "b233269571ca360af279958",
      "tool": "skeleton",
      "title": "Skeleton",
      "required": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1",
      "skeletonData": {
        "nodes": [
          {
            "id": "2d0b31e36fc36ab7c8b8255",
            "name": "1",
            "x": 226,
            "y": 48
          },
          {
            "id": "d241121647111766e19c743",
            "name": "2",
            "x": 228,
            "y": 152
          },
          {
            "id": "6db8e6f91a9efc803f05004",
            "name": "3",
            "x": 152,
            "y": 227
          },
          {
            "id": "d6df89cc9917e1641537667",
            "name": "4",
            "x": 304,
            "y": 229
          }
        ],
        "edges": [
          {
            "id": "5abdfe2f38da9f859ea5275",
            "from": "2d0b31e36fc36ab7c8b8255",
            "to": "d241121647111766e19c743"
          },
          {
            "id": "99652b301b58111d86fb802",
            "from": "d241121647111766e19c743",
            "to": "6db8e6f91a9efc803f05004"
          },
          {
            "id": "78d167d96c6c1d9773d1651",
            "from": "d241121647111766e19c743",
            "to": "d6df89cc9917e1641537667"
          }
        ]
      }
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

### Tools with Nested Classifications

#### Bounding Box / Radio

{% tabs %}
{% tab title="Import by Title" %}

```json
[
    {
        "externalId": "example.png",
        "objects": [
            {
                "title": "Car",
                "bounding-box": {
                    "x": 192,
                    "y": 166,
                    "width": 66,
                    "height": 61
                },
                "classifications": [
                    {
                        "title": "Color",
                        "answer": "Black"
                    }
                ]

            },
            {
                "title": "Car",
                "bounding-box": {
                    "x": 56,
                    "y": 56,
                    "width": 67,
                    "height": 44
                },
                "classifications": [
                    {
                        "title": "Color",
                        "answer": "Yellow"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import by Schema ID" %}

```json
[
    {
        "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"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "c72440f85fecbd439bca284",
      "ocrEnabled": false,
      "classifications": [
        {
          "title": "Color",
          "tool": "radio",
          "required": false,
          "schemaId": "a7800ce15dcae82c8d51463",
          "frameSpecific": false,
          "classifications": [],
          "multiple": false,
          "options": [
            {
              "value": "Red",
              "schemaId": "752a2fcac3678fe2ce55143"
            },
            {
              "value": "White",
              "schemaId": "3c1f49512c9ce13d3b9c051"
            },
            {
              "value": "Black",
              "schemaId": "850cd2aa1a984d2e0759492"
            },
            {
              "value": "Blue",
              "schemaId": "027e53efb4f96329a0d2278"
            },
            {
              "value": "Green",
              "schemaId": "ae4281fc4ebf50e9bf2f625"
            },
            {
              "value": "Yellow",
              "schemaId": "6d5e4052b7a54c23c20e163"
            }
          ]
        }
      ],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

{% hint style="info" %}
Any tool and classification available in Ango Hub can be used as a nested classification. The Bounding Box and Radio combination is provided here as an example.
{% endhint %}

### Tool Import for Video and Multi-Image Labeling

#### Tools: Video Labeling

{% hint style="info" %}
Video object annotations use `keyFrames` for frames where the object's geometry is explicitly set. Hub interpolates supported object tools between those keyframes within the object's `segments` range. See [Frame Interpolation](https://docs.imerit.net/core-concepts/frame-interpolation.md) for how keyframes, segments, and out-of-view segments appear in the video editor.
{% endhint %}

```json
[
    {
        "externalId": "example.mp4",
        "objects": [
            {
                "schemaId": "09f90db83b842d7bf0c2225",
                "objectId": "12345",
                "segments": [0, 60],
                "outOfViewSegments": [[20, 25], [45, 50]],
                "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
                        }
                    }
                }
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

**Customize Timeline Color**

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

```json
[
    {
        "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
                        }
                    }
                }
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

{% hint style="info" %}
Any tool available in Ango Hub can be used with video assets. The Bounding Box tool is provided here as an example.
{% endhint %}

#### Video Tools with Nested Classifications

To attach classifications to a video object, add a `classifications` array to the object, alongside its `keyFrames`. Each nested classification can have its own `segments`, `keyFrames`, and `objectId`. To nest another classification inside it, add a further `classifications` array to that classification.

The following example imports a bounding box with two classifications, *Color* and *Contrast*. A third classification, *Color level*, is nested inside *Color*. The bounding box and all three classifications span frame indexes 5 through 200. Frame indexes start from 0.

{% hint style="info" %}
Before importing, create and save a matching label set. Replace `schemaId1` through `schemaId4` in the import file with the corresponding IDs from your project's *Settings > Label Set*, and replace `example_video.mp4` with your asset's external ID, including its video file extension.

The sample category schema below uses Radio classifications for *Color* and *Contrast*, and a Text classification for *Color level*. The radio answers must match the option values, including capitalization. The values `"50"` and `"10"` are text answers.

When adding *Color level* under *Color*, choose *Any* so that it applies to both color options. The sample schema has no `parentOptionId`; adding one would make the child classification conditional on that option.
{% endhint %}

```json
[
    {
        "externalId": "example_video.mp4",
        "objects": [
            {
                "schemaId": "schemaId1",
                "objectId": "12345",
                "segments": [5, 200],
                "keyFrames": {
                    "5": {
                        "bounding-box": {
                            "x": 50,
                            "y": 100,
                            "height": 200,
                            "width": 400
                        }
                    },
                    "100": {
                        "bounding-box": {
                            "x": 150,
                            "y": 120,
                            "height": 200,
                            "width": 400
                        }
                    },
                    "200": {
                        "bounding-box": {
                            "x": 250,
                            "y": 140,
                            "height": 200,
                            "width": 400
                        }
                    }
                },
                "classifications": [
                    {
                        "schemaId": "schemaId2",
                        "objectId": "12345-color",
                        "segments": [5, 200],
                        "keyFrames": {
                            "5": {
                                "answer": "red"
                            },
                            "100": {
                                "answer": "green"
                            }
                        },
                        "classifications": [
                            {
                                "schemaId": "schemaId3",
                                "objectId": "12345-color-level",
                                "segments": [5, 200],
                                "keyFrames": {
                                    "5": {
                                        "answer": "50"
                                    },
                                    "100": {
                                        "answer": "10"
                                    }
                                }
                            }
                        ]
                    },
                    {
                        "schemaId": "schemaId4",
                        "objectId": "12345-contrast",
                        "segments": [5, 200],
                        "keyFrames": {
                            "5": {
                                "answer": "25-50"
                            },
                            "150": {
                                "answer": "75-100"
                            }
                        }
                    }
                ]
            }
        ]
    }
]
```

{% file src="/files/WRrJhiV79StuxGVToQMR" %}
Download the sample import JSON
{% endfile %}

The classifications change independently of the bounding box's geometry keyframes. For example, *Contrast* changes at frame 150 even though the box has no geometry keyframe at that frame. Classification answers carry forward until the next classification keyframe or the end of the segment; numeric-looking text answers are not interpolated.

| Frame indexes | Color | Color level | Contrast |
| ------------- | ----- | ----------- | -------- |
| 5–99          | red   | 50          | 25-50    |
| 100–149       | green | 10          | 25-50    |
| 150–200       | green | 10          | 75-100   |

For more on the difference between object interpolation and classification answers, see [Frame Interpolation](https://docs.imerit.net/core-concepts/frame-interpolation.md).

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "schemaId1",
      "ocrEnabled": false,
      "classifications": [
        {
          "title": "Color",
          "tool": "radio",
          "required": false,
          "schemaId": "schemaId2",
          "frameSpecific": true,
          "classifications": [
            {
              "title": "Color level",
              "tool": "text",
              "required": false,
              "schemaId": "schemaId3",
              "frameSpecific": true,
              "classifications": [],
              "multiple": false
            }
          ],
          "multiple": false,
          "options": [
            {
              "value": "red",
              "schemaId": "schemaId5"
            },
            {
              "value": "green",
              "schemaId": "schemaId6"
            }
          ]
        },
        {
          "title": "Contrast",
          "tool": "radio",
          "required": false,
          "schemaId": "schemaId4",
          "frameSpecific": true,
          "classifications": [],
          "multiple": false,
          "options": [
            {
              "value": "25-50",
              "schemaId": "schemaId7"
            },
            {
              "value": "75-100",
              "schemaId": "schemaId8"
            }
          ]
        }
      ],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

#### Tools: 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.

```json
[
    {
        "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
                }
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "09f90db83b842d7bf0c2225",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

{% hint style="info" %}
Any tool available in Ango Hub can be used with multi-image assets. The Bounding Box tool is provided here as an example.
{% endhint %}

***

## Classifications

### Radio

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "97e1dfeffc6228423aa3007",
                "answer": "Green"
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "radio",
      "required": false,
      "schemaId": "97e1dfeffc6228423aa3007",
      "frameSpecific": false,
      "classifications": [],
      "multiple": false,
      "options": [
        {
          "value": "Green",
          "schemaId": "98a48fa4a08513e2ed49621"
        },
        {
          "value": "Red",
          "schemaId": "78a1bb2814b65e53bfd4756"
        },
        {
          "value": "Blue",
          "schemaId": "b83883a9fdab443ab824195"
        },
        {
          "value": "Yellow",
          "schemaId": "423f7c7021445479e1fb016"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

### Checkbox

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "5080b746a37f41d3fc89933",
                "answer": ["Green", "Red"]
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "checkbox",
      "required": false,
      "schemaId": "5080b746a37f41d3fc89933",
      "frameSpecific": false,
      "classifications": [],
      "multiple": false,
      "options": [
        {
          "value": "Green",
          "schemaId": "4f2c47ac537a2478b9b4788"
        },
        {
          "value": "Red",
          "schemaId": "988e1f12078d011dea48916"
        },
        {
          "value": "Blue",
          "schemaId": "2264999cc377c8875c11689"
        },
        {
          "value": "Yellow",
          "schemaId": "77686bf9451ddefe4c9f540"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

### Single-Select Dropdown

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "b12539e62f749ac59372624",
                "answer": "Green"
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "single-dropdown",
      "required": false,
      "schemaId": "b12539e62f749ac59372624",
      "frameSpecific": false,
      "classifications": [],
      "multiple": false,
      "options": [
        {
          "value": "Green",
          "schemaId": "f6fdafafbb3181d769c8146"
        },
        {
          "value": "Red",
          "schemaId": "c594fd08cfb06d070cf8224"
        },
        {
          "value": "Blue",
          "schemaId": "144b9df0b37055ed9e29649"
        },
        {
          "value": "Yellow",
          "schemaId": "c1e406eaa03aef110e47501"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

### Multi-Select Dropdown

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "9096a7b7d5cbd2057bb9356",
                "answer": ["Green", "Red"]
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "multi-dropdown",
      "required": false,
      "schemaId": "9096a7b7d5cbd2057bb9356",
      "frameSpecific": false,
      "classifications": [],
      "multiple": false,
      "options": [
        {
          "value": "Green",
          "schemaId": "8fcb93e767f73db675f4543"
        },
        {
          "value": "Red",
          "schemaId": "0e63c4be51fb78fd712b576"
        },
        {
          "value": "Blue",
          "schemaId": "9745d1fe49ad079303ca923"
        },
        {
          "value": "Yellow",
          "schemaId": "aae6511fffb327abc17f306"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

### Single-Select Tree

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "27b16368a548b90d7169967",
                "answer": "Trunk / Branch 2 / Leaf 2"
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Sample Tree Dropdown",
      "tool": "single-tree-dropdown",
      "required": false,
      "schemaId": "27b16368a548b90d7169967",
      "frameSpecific": false,
      "classifications": [],
      "multiple": false,
      "options": [
        {
          "value": "Trunk",
          "schemaId": "a7607151c841a133fb84394"
        },
        {
          "value": "Trunk / Branch 1",
          "schemaId": "a6e322e426042b69b781020"
        },
        {
          "value": "Trunk / Branch 1 / Leaf 1",
          "schemaId": "82922b933af5a2783a54285"
        },
        {
          "value": "Trunk / Branch 2",
          "schemaId": "8c8391f4ed2c1015aa25501"
        },
        {
          "value": "Trunk / Branch 2 / Leaf 2",
          "schemaId": "a092d33d27e65937c2e2443"
        }
      ],
      "shortcutKey": "1",
      "treeOptions": [
        {
          "title": "Trunk",
          "key": "a7607151c841a133fb84394",
          "value": "a7607151c841a133fb84394",
          "children": [
            {
              "title": "Branch 1",
              "value": "a6e322e426042b69b781020",
              "key": "a6e322e426042b69b781020",
              "children": [
                {
                  "title": "Leaf 1",
                  "value": "82922b933af5a2783a54285",
                  "key": "82922b933af5a2783a54285"
                }
              ]
            },
            {
              "title": "Branch 2",
              "value": "8c8391f4ed2c1015aa25501",
              "key": "8c8391f4ed2c1015aa25501",
              "children": [
                {
                  "title": "Leaf 2",
                  "value": "a092d33d27e65937c2e2443",
                  "key": "a092d33d27e65937c2e2443"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "relations": []
}
```

</details>

### Multi-Select Tree

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "7fb05854b6b28ff05a4e227",
                "answer": [
                    "Trunk",
                    "Trunk / Branch 2",
                    "Trunk / Branch 1 / Leaf 1",
                    "Trunk / Branch 2 / Leaf 2"
                ]
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Sample Tree Dropdown",
      "tool": "tree-dropdown",
      "required": false,
      "schemaId": "7fb05854b6b28ff05a4e227",
      "frameSpecific": false,
      "showDropdown": false,
      "classifications": [],
      "multiple": false,
      "options": [
        {
          "value": "Trunk",
          "schemaId": "030c9bc65d0d7c677ac3705"
        },
        {
          "value": "Trunk / Branch 1",
          "schemaId": "5f04518646a82aff33e5573"
        },
        {
          "value": "Trunk / Branch 1 / Leaf 1",
          "schemaId": "650b8b3bbe7a6ae55b00639"
        },
        {
          "value": "Trunk / Branch 2",
          "schemaId": "2e44479c9098983b9611260"
        },
        {
          "value": "Trunk / Branch 2 / Leaf 2",
          "schemaId": "001c29efb030deb2188e481"
        }
      ],
      "shortcutKey": "1",
      "treeOptions": [
        {
          "title": "Trunk",
          "key": "030c9bc65d0d7c677ac3705",
          "value": "030c9bc65d0d7c677ac3705",
          "children": [
            {
              "title": "Branch 1",
              "value": "5f04518646a82aff33e5573",
              "key": "5f04518646a82aff33e5573",
              "children": [
                {
                  "title": "Leaf 1",
                  "value": "650b8b3bbe7a6ae55b00639",
                  "key": "650b8b3bbe7a6ae55b00639"
                }
              ]
            },
            {
              "title": "Branch 2",
              "value": "2e44479c9098983b9611260",
              "key": "2e44479c9098983b9611260",
              "children": [
                {
                  "title": "Leaf 2",
                  "value": "001c29efb030deb2188e481",
                  "key": "001c29efb030deb2188e481"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "relations": []
}
```

</details>

### Text

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "a9c72798e9cfb6ad9ab4364",
                "answer": "Green"
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "text",
      "required": false,
      "schemaId": "a9c72798e9cfb6ad9ab4364",
      "frameSpecific": false,
      "richText": false,
      "regex": "",
      "classifications": [],
      "multiple": false,
      "options": [],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

### Nested Classifications

#### Radio / Radio / Radio

```json
[
    {
        "externalId": "example.png",
        "classifications": [
            {
                "schemaId": "905d68fb647890538d5a469",
                "answer": "A",
                "classifications": [
                    {
                        "schemaId": "00298d59fb1e305a771a603",
                        "answer": "A1",
                        "classifications": [
                            {
                                "schemaId": "403a2c4d4069ebbca375452",
                                "answer": "A1-1"
                            }
                        ]
                    }
                ]
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Level-1",
      "tool": "radio",
      "required": false,
      "schemaId": "905d68fb647890538d5a469",
      "frameSpecific": false,
      "classifications": [
        {
          "title": "Level-2",
          "tool": "radio",
          "required": false,
          "schemaId": "00298d59fb1e305a771a603",
          "frameSpecific": false,
          "classifications": [
            {
              "title": "Level-3",
              "tool": "radio",
              "required": false,
              "schemaId": "403a2c4d4069ebbca375452",
              "frameSpecific": false,
              "classifications": [],
              "multiple": false,
              "options": [
                {
                  "value": "A1-1",
                  "schemaId": "bb201ae71c27fa266f1f895"
                },
                {
                  "value": "A1-2",
                  "schemaId": "4ae7cdddec44bd1c6665215"
                }
              ],
              "parentOptionId": "50444ee32efadfce8bf9899"
            }
          ],
          "multiple": false,
          "options": [
            {
              "value": "A1",
              "schemaId": "50444ee32efadfce8bf9899"
            },
            {
              "value": "A2",
              "schemaId": "076152f01623a1b7e9b3146"
            },
            {
              "value": "A3",
              "schemaId": "f34db38f29da728bc25f312"
            }
          ],
          "parentOptionId": "b5650e446862a5383564396"
        }
      ],
      "multiple": false,
      "options": [
        {
          "value": "A",
          "schemaId": "b5650e446862a5383564396"
        },
        {
          "value": "B",
          "schemaId": "a029acbff0a2ef120c15689"
        },
        {
          "value": "C",
          "schemaId": "3fa2f657a1f3639c978d609"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

{% hint style="info" %}
Any classification available in Ango Hub can be used as a nested classification. Nested Radio classifications are provided here as an example.
{% endhint %}

### Multiple Classifications

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FVZkNWEICEQveAV0c45AY%2Fimage.png?alt=media&amp;token=e8defd26-b1d1-400f-9430-53ef0766aad1" alt=""><figcaption></figcaption></figure>

```json
[
    {
        "externalId": "example.mp3",
        "classifications": [
            {
                "schemaId": "97e1dfeffc6228423aa3007",
                "answer": "Green"
            },
            {
                "schemaId": "97e1dfeffc6228423aa3007",
                "answer": "Red"
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "radio",
      "required": false,
      "schemaId": "97e1dfeffc6228423aa3007",
      "frameSpecific": false,
      "classifications": [],
      "multiple": true,
      "options": [
        {
          "value": "Green",
          "schemaId": "98a48fa4a08513e2ed49621"
        },
        {
          "value": "Red",
          "schemaId": "78a1bb2814b65e53bfd4756"
        },
        {
          "value": "Blue",
          "schemaId": "b83883a9fdab443ab824195"
        },
        {
          "value": "Yellow",
          "schemaId": "423f7c7021445479e1fb016"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

{% hint style="info" %}
Any classification available in Ango Hub can be used in multiple question mode. The Radio classification is provided here as an example.
{% endhint %}

### Classification Import for 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.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FdAzyXem4xbM5myA4w4xE%2FScreenshot%202024-10-14%20at%2011.50.44.png?alt=media&amp;token=5fe0373d-ff20-485f-9e2c-41be13705cfc" alt=""><figcaption></figcaption></figure>

#### Classifications: Video Labeling

For classifications attached to an individual video object, see [Video Tools with Nested Classifications](#video-tools-with-nested-classifications).

{% hint style="info" %}
Frame-specific video classifications also use `keyFrames`, but the keyframe value is an `answer`, not object geometry. The latest previous classification keyframe applies until another keyframe changes the answer, or until the classification's `segments` range ends. See [Frame-Specific Classifications](https://docs.imerit.net/core-concepts/frame-interpolation.md#frame-specific-classifications) for the UI behavior.
{% endhint %}

```json
[
    {
        "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": []
    }
]	
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "radio",
      "required": false,
      "schemaId": "5570fff8bbe9a7d2e7cb117",
      "frameSpecific": true,
      "classifications": [],
      "multiple": true,
      "options": [
        {
          "value": "Green",
          "schemaId": "26d805c6ec81245adccb862"
        },
        {
          "value": "Red",
          "schemaId": "0be6e24a61dbff01d708441"
        },
        {
          "value": "Blue",
          "schemaId": "af7f1bb93023a49e21ac924"
        },
        {
          "value": "Yellow",
          "schemaId": "0ba5dcc111376a878071563"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

**Customize Timeline Color**

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

```json
[
    {
        "externalId": "example.mp4",
        "classifications": [
            {
                "schemaId": "5570fff8bbe9a7d2e7cb117",
                "objectId": "12345",
                "segments": [0, 60],
                "outOfViewSegments": [[20, 25], [45, 50]],
                "customColorIntervals": [
                    {
                        "interval": [5, 15],
                        "color": "#ffff00"
                    }
                ],
                "keyFrames": {
                    "5": {
                        "answer": "Green"
                    },
                    "15": {
                        "answer": "Red"
                    },
                    "40": {
                        "answer": "Blue"
                    }
                }
            }
        ],
        "objects": [],
        "relations": []
    }
]	
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "radio",
      "required": false,
      "schemaId": "5570fff8bbe9a7d2e7cb117",
      "frameSpecific": true,
      "classifications": [],
      "multiple": true,
      "options": [
        {
          "value": "Green",
          "schemaId": "26d805c6ec81245adccb862"
        },
        {
          "value": "Red",
          "schemaId": "0be6e24a61dbff01d708441"
        },
        {
          "value": "Blue",
          "schemaId": "af7f1bb93023a49e21ac924"
        },
        {
          "value": "Yellow",
          "schemaId": "0ba5dcc111376a878071563"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

{% hint style="info" %}
Any classification available in Ango Hub can be used with video assets. The Radio classification is provided here as an example.
{% endhint %}

#### Classifications: Multi-Image Labeling

```json
[
    {
        "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
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [],
  "classifications": [
    {
      "title": "Color",
      "tool": "radio",
      "required": false,
      "schemaId": "5570fff8bbe9a7d2e7cb117",
      "frameSpecific": true,
      "classifications": [],
      "multiple": true,
      "options": [
        {
          "value": "Green",
          "schemaId": "26d805c6ec81245adccb862"
        },
        {
          "value": "Red",
          "schemaId": "0be6e24a61dbff01d708441"
        },
        {
          "value": "Blue",
          "schemaId": "af7f1bb93023a49e21ac924"
        },
        {
          "value": "Yellow",
          "schemaId": "0ba5dcc111376a878071563"
        }
      ],
      "shortcutKey": "1"
    }
  ],
  "relations": []
}
```

</details>

{% hint style="info" %}
Any classification available in Ango Hub can be used with multi-image assets. The Radio classification is provided here as an example.
{% endhint %}

***

## Relations

### Single

{% hint style="info" %}
**Direction Options:** "straight", "reverse", "bidirectional"
{% endhint %}

```json
[
    {
        "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",
                "classifications": [
                    {
                        "schemaId": "0c51ed85d18425a9d590100",
                        "answer": "Direct"
                    }
                ]
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "e29868a0f61c679133fe505",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": [
    {
      "title": "Related",
      "tool": "one-to-one",
      "required": false,
      "schemaId": "c344baf6021ac976cd3f509",
      "classifications": [
        {
          "title": "Connection type",
          "tool": "radio",
          "required": false,
          "schemaId": "0c51ed85d18425a9d590100",
          "classifications": [],
          "multiple": false,
          "options": [
            {
              "value": "Direct",
              "schemaId": "0c51ed85d18425a9d590101"
            },
            {
              "value": "Indirect",
              "schemaId": "0c51ed85d18425a9d590102"
            }
          ]
        }
      ],
      "multiple": false,
      "color": "#03a9f4",
      "shortcutKey": "2"
    }
  ]
}
```

</details>

The optional `classifications` list contains answers to questions configured on the relation. It follows the same nested-classification format used by tools and is supported for both Single and Group relations.

### Group

```json
[
    {
        "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"
                ]
            }
        ]
    }
]
```

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "title": "Car",
      "tool": "bounding-box",
      "required": false,
      "schemaId": "14b0745eb3fd0fb920a0664",
      "ocrEnabled": false,
      "classifications": [],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": [
    {
      "title": "Related",
      "tool": "group",
      "required": false,
      "schemaId": "6261613fab7418ef20b0243",
      "classifications": [],
      "multiple": false,
      "color": "#03a9f4",
      "shortcutKey": "2"
    }
  ]
}
```

</details>

{% hint style="info" %}
Any tool available in Ango Hub can be used with relations. The Bounding Box tool is provided here as an example.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.imerit.net/data/importing-and-exporting-annotations/importing-annotations/ango-import-format.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
