Projects

Create project

To create a project:

sa.create_project(
    project_name = "Project Name",
    project_description = "Project Description",
    project_type = "Vector")

📘

Project types

Image Project: Vector
Image (Legacy) Project: Pixel Video Project: Video Text Project: Document

To create a Video Project and set the frame rate:

sa.create_project(
    project_name = "Project Name",
    project_description = "Project Description",
    project_type = "Video",
    settings = [{"attribute": "FrameRate", "value": 24}]
)

Rename project

To rename a project:

sa.rename_project(
    project = "Project Name",
    new_name = "New Project Name")

Set project status

To set the status of a project:

SAClient.set_project_status(
	project = "Project 1"
	status = "Completed")

The status should be one of the following: NotStarted, InProgress, Completed, or OnHold.

Delete project

To delete a project:

sa.delete_project(project = "Project Name")

Clone project

To clone an existing project with its setup, annotation classes, and contributors:

sa.clone_project(
    project_name = "Clone Project Name",
    from_project = "Existing Project Name",
    project_description = "Clone Project Description",
    copy_annotation_classes = True,
    copy_settings = True,
    copy_workflow = True,
    copy_contributors = False)

To clone projects with attached URLs:

sa.clone_project( 
    project_name = "New Project Name",
    from_project = "Source Project Name",
    project_description = "New Project Description", 
    copy_annotation_classes = True, 
    copy_settings = True,
    copy_contributors = False)

📘

Newly created projects will have a Not Started status.

Share project

To share a project with the project contributors:

sa.add_contributors_to_project(
    project = "Project Name",
    emails = ["[email protected]", "[email protected]"],
    role = "Annotator")

📘

The value of the user role field can be: Admin, Annotator, or QA.

Search project

To get the list of projects in the current team:

sa.search_projects()

To get projects by status:

superannotate.search_projects(  
  status="Completed"
)

📘

Project statuses

A project can have one of the following statuses: NotStarted, InProgress, OnHold, Completed, and Undefined.

To get projects with the specified search string:

sa.search_projects(name = "Project Prefix")

To get the list of projects that contain at least one image that has the Completed annotations status:

sa.search_projects(
    name = "Project Prefix",
    include_complete_item_count = True)

Get subsets

To get a list of a project's subsets:

sa.get_subsets(
   project = "Car Project"
)

The output will be a list of subsets. Here's an example:

[{'name': 'Blue cars'}, {'name': 'Green cars'}]

Project settings

To get project settings:

sa.get_project_settings(project = "Project Name")

Project steps

To get a project’s steps: get_project_steps()

For General Annotation steps:

[
    {
        "step": 1,
        "className": "Anatomy",
        "tool": 2,
        "attribute": [
            {
                "attribute": {
                    "name": "Lung",
                    "attribute_group": {"name": "Organs"}
                }
            }
        ]
    }
]

For Keypoint Annotation steps:

{
  "steps": [
    {
      "step": 1,
      "className": "Left Shoulder",
      "class_id": "1",
      "attribute": [
        {
                "attribute": {
                    "id": 123,
                    "group_id": 12
                }
            }
      ]
    },
    {
      "step": 2,
      "class_id": "2",
      "className": "Right Shoulder",
    }
  ],
  "connections": [
    [1, 2]
  ]
}

To set a project’s steps: set_project_steps()

For General Annotation steps:

sa.set_project_steps(
    project="Medical Annotations",
    steps=[
        {
            "step": 1,
            "className": "Anatomy",
            "tool": 2,
            "attribute": [
                {
                    "attribute": {
                        "name": "Lung",
                        "attribute_group": {"name": "Organs"}
                    }
                }
            ]
        }
    ]
)

For Keypoint Annotation steps:

sa.set_project_steps(
    project="Pose Estimation Project",
    steps=[
        {
            "step": 1,
            "class_id": 12,
            "attribute": [
                {
                    "attribute": {
                        "id": 123,
                        "group_id": 12
                    }
                }
            ]
        },
        {
            "step": 2,
            "class_id": 13
        }
    ],
    connections=[
        [1, 2]
    ]
)