For the complete documentation index, see llms.txt. This page is also available as Markdown.

import_labels

imerit_ango.sdk.SDK.

import_labels(project_id, labels)

Import pre-labels into existing project tasks.

Parameters

  • project_id: string

  • labels: List[dict]

    • List of labels to import. See more on our label format here: Ango Annotation Format and learn more about importing labels into Ango Hub here.

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

Returns:

  • output: dict

    • A dictionary containing the result of the operation.

    • Including a status field indicating whether the request was successful and a data field containing the response payload with updated resources produced by the operation.

How to verify in Ango Hub?

After successfully executing the import_labels function, you can validate the changes directly in Ango Hub.

Navigate to: Projects → [Your Project] → Settings → Assets

  • Filter assets using their External ID.

  • Confirm that the selected assets are pre-labeled correctly.

Changes made via the SDK are reflected in Ango Hub in near real-time. If updates are not immediately visible, please refresh the page.

Example

Import Bounding Box

Sample Category Schema

Import Brush

Brush masks must use fully transparent black pixels for the background: [0, 0, 0, 0]. Do not use another RGB value with zero alpha, such as [255, 255, 255, 0], for transparent background pixels.

Sample Category Schema

Import Medical Brush

Sample Category Schema

Last updated