import_labels
imerit_ango.sdk.SDK.
import_labels(project_id, labels)
Import labels to the project. More details on importing existing labels to Hub here.
You can only import annotations for tasks in the Start stage.
Please ensure the assets you are trying to annotate as in the Start stage of your project before continuing.
Parameters
project_id: string
The unique identifier for the project. You can find the project ID in the user interface or retrieve it using the
list_projects
function.
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.
Returns:
output: dict
A dictionary containing the result of the operation.
Example
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')
ango_sdk = SDK(api_key)
schema_id = '<Schema ID of Car Class>'
annotations = [{"externalId": "10001.png",
"objects": [{"schemaId": schema_id,
"title": 'Car',
"bounding-box": {"x": 20, "y": 30, "width": 50, "height": 60}}]
}]
ango_sdk.import_labels(project_id, annotations)
Last updated