create_project
imerit_ango.sdk.SDK.
create_project(name, description, project_type, pct_config)
Create a new project with the specified name and description.
Parameters
name: string
The name of the project to be created. This field is required and cannot be left empty.
Example:
'Project One'
description: string, optional, default ""
A brief description of the project.
Example:
'Vehicle Classification Project'
project_type: ProjectType, optional, default None
Specifies the type of the project.
Options:
ProjectType.Ango
ProjectType.PCT
pct_config: PctConfig, optional, default None
Configuration object for PCT projects.
PctConfig
allow_overlapping: bool, default False
Allows multiple annotations to overlap within the same frame.
tracking_multiple_sensors: bool, default False
Enables tracking across multiple sensors.
segmentation_mode: bool, default False
Activates segmentation mode.
Returns:
output: dict
A dictionary containing the result of the operation.
Example
Create a standard Ango project:
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
ango_sdk = SDK(api_key)
response = ango_sdk.create_project(name="New Ango Project",
description="Created via SDK")
project_id = response.get("data", {}).get("project", {}).get("_id")curl -X POST "https://imeritapi.ango.ai/v2/project" \
-H "Content-Type: application/json" \
-H "apikey: $ANGO_API_KEY" \
-d '{
"description": "Created via SDK",
"name": "New Ango Project"
}'Create a PCT project:
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from imerit_ango.models.enums import ProjectType
from imerit_ango.models.pct_config import PctConfig
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
ango_sdk = SDK(api_key)
pct_configuration = PctConfig(allow_overlapping=False,
tracking_multiple_sensors=False,
segmentation_mode=False)
response = ango_sdk.create_project(name="New PCT Project",
description="Created via SDK",
project_type=ProjectType.PCT,
pct_config=pct_configuration)
project_id = response.get("data", {}).get("project", {}).get("_id")curl -X POST "https://imeritapi.ango.ai/v2/project" \
-H "Content-Type: application/json" \
-H "apikey: $ANGO_API_KEY" \
-d '{
"description": "Created via SDK",
"name": "My New PCT Project",
"pctConfig": {
"allowOverlapping": false,
"segmentationMode": false,
"trackingMultipleSensors": false
},
"type": "pct"
}'Last updated