Annotations

Get annotations

To get annotations from a project's root:

annotations = sa.get_annotations(project = "Project Name")

To get annotations from a list of items:

annotations = sa.get_annotations(project = "Project Name",
                                 items = ["item1.png", "item2.png", "item3.png"])

This function returns a list of annotations.

To get annotations per frame:

frame_annotations = SAClient.get_annotations_per_frame(project = "Project Name",
                                                 video ="video.mp4", fps = 30)

If you don't set a value to the fps, the value will be set for 1.

This function returns a list of the annotations per frame.

[
    {
        "frame": 1,
        "annotations": []
    },
    {
        "frame": 2,
        "annotations": []
    },
]

Description:

  • “frame”: integer - The frame number.
  • “annotations”: array - The list of annotations in the frame.

Delete item annotations

To delete all the annotations in a project:

sa.delete_annotations(project = "Project Name")

To delete all the annotations in a list of items:

sa.delete_annotations(project = "Project Name", item_names = ["item1.png", "item2.png"])

🚧

When you delete all the annotations, the items will have the Not Started annotation status.