Skip to content

Latest commit

 

History

History
834 lines (588 loc) · 40.4 KB

annotations.md

File metadata and controls

834 lines (588 loc) · 40.4 KB
description sidebar_position
Label your data.
1

Annotations

Label your data


Annotations (also known as labels) describe your inputs. When you add inputs to your app, we will create an input level annotation for each input. This input level annotation contains any data you provided in POST /inputs call. Models in your default workflow can also write annotations.

Once your input is successfully indexed, you can add additional annotations, such as concepts and bounding boxes.

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from "@theme/CodeBlock";

import PythonAnnotateExistingRegionsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/annotate_existing_regions_image.py"; import PythonAnnotateImagesConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/annotate_images_concepts.py"; import PythonAnnotateImagesMultipleConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/annotate_images_multiple_concepts.py"; import PythonAnnotateImagesUserIdStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/annotate_images_user_id_status.py"; import PythonAnnotateNewBoundingBoxesImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/annotate_new_bounding_boxes_image.py"; import PythonAnnotatePolygonsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/annotate_polygons_image.py"; import PythonbulkDeleteAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/bulk_delete_annotations_input_annotation_ids.py"; import PythonBulkDeleteAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/bulk_delete_annotations_input_ids.py"; import PythonDeleteAnnotationInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/delete_annotation_input_annotation_ids.py"; import PythonListAllAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/list_all_annotations_app.py"; import PythonListAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/list_annotations_input_annotation_ids.py"; import PythonListAnnotationsModelVersionIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/list_annotations_model_version_ids.py"; import PythonListAnnotationsUserIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/list_annotations_user_ids.py"; import PythonlistUserCreatedAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/list_user_created_annotations_app.py"; import PythonListUserCreatedAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/list_user_created_annotations_input_ids.py"; import PythonUpdateAnnotationConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/update_annotation_concepts.py"; import PythonUpdateAnnotationConceptsRegion from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/update_annotation_concepts_region.py"; import PythonUpdateAnnotationRegionCoordinates from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/update_annotation_region_coordinates.py"; import PythonUpdateAnnotationStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/py/update_annotation_status.py";

import JSAnnotateExistingRegionsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/annotate_existing_regions_image.html"; import JSAnnotateImagesConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/annotate_images_concepts.html"; import JSAnnotateImagesMultipleConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/annotate_images_multiple_concepts.html"; import JSAnnotateImagesUserIdStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/annotate_images_user_id_status.html"; import JSAnnotateNewBoundingBoxesImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/annotate_new_bounding_boxes_image.html"; import JSAnnotatePolygonsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/annotate_polygons_image.html"; import JSbulkDeleteAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/bulk_delete_annotations_input_annotation_ids.html"; import JSBulkDeleteAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/bulk_delete_annotations_input_ids.html"; import JSDeleteAnnotationInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/delete_annotation_input_annotation_ids.html"; import JSListAllAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/list_all_annotations_app.html"; import JSListAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/list_annotations_input_annotation_ids.html"; import JSListAnnotationsModelVersionIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/list_annotations_model_version_ids.html"; import JSListAnnotationsUserIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/list_annotations_user_ids.html"; import JSlistUserCreatedAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/list_user_created_annotations_app.html"; import JSListUserCreatedAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/list_user_created_annotations_input_ids.html"; import JSUpdateAnnotationConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/update_annotation_concepts.html"; import JSUpdateAnnotationConceptsRegion from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/update_annotation_concepts_region.html"; import JSUpdateAnnotationRegionCoordinates from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/update_annotation_region_coordinates.html"; import JSUpdateAnnotationStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/js/update_annotation_status.html";

import NodeAnnotateExistingRegionsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/annotate_existing_regions_image.js"; import NodeAnnotateImagesConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/annotate_images_concepts.js"; import NodeAnnotateImagesMultipleConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/annotate_images_multiple_concepts.js"; import NodeAnnotateImagesUserIdStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/annotate_images_user_id_status.js"; import NodeAnnotateNewBoundingBoxesImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/annotate_new_bounding_boxes_image.js"; import NodeAnnotatePolygonsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/annotate_polygons_image.js"; import NodebulkDeleteAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/bulk_delete_annotations_input_annotation_ids.js"; import NodeBulkDeleteAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/bulk_delete_annotations_input_ids.js"; import NodeDeleteAnnotationInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/delete_annotation_input_annotation_ids.js"; import NodeListAllAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/list_all_annotations_app.js"; import NodeListAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/list_annotations_input_annotation_ids.js"; import NodeListAnnotationsModelVersionIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/list_annotations_model_version_ids.js"; import NodeListAnnotationsUserIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/list_annotations_user_ids.js"; import NodelistUserCreatedAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/list_user_created_annotations_app.js"; import NodeListUserCreatedAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/list_user_created_annotations_input_ids.js"; import NodeUpdateAnnotationConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/update_annotation_concepts.js"; import NodeUpdateAnnotationConceptsRegion from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/update_annotation_concepts_region.js"; import NodeUpdateAnnotationRegionCoordinates from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/update_annotation_region_coordinates.js"; import NodeUpdateAnnotationStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/node/update_annotation_status.js";

import JavaAnnotateExistingRegionsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/annotate_existing_regions_image.java"; import JavaAnnotateImagesConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/annotate_images_concepts.java"; import JavaAnnotateImagesUserIdStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/annotate_images_user_id_status.java"; import JavaAnnotateNewBoundingBoxesImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/annotate_new_bounding_boxes_image.java"; import JavaAnnotatePolygonsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/annotate_polygons_image.java"; import JavabulkDeleteAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/bulk_delete_annotations_input_annotation_ids.java"; import JavaBulkDeleteAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/bulk_delete_annotations_input_ids.java"; import JavaDeleteAnnotationInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/delete_annotation_input_annotation_ids.java"; import JavaListAllAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/list_all_annotations_app.java"; import JavaListAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/list_annotations_input_annotation_ids.java"; import JavaListAnnotationsModelVersionIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/list_annotations_model_version_ids.java"; import JavaListAnnotationsUserIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/list_annotations_user_ids.java"; import JavalistUserCreatedAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/list_user_created_annotations_app.java"; import JavaListUserCreatedAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/list_user_created_annotations_input_ids.java"; import JavaUpdateAnnotationConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/update_annotation_concepts.java"; import JavaUpdateAnnotationConceptsRegion from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/update_annotation_concepts_region.java"; import JavaUpdateAnnotationRegionCoordinates from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/update_annotation_region_coordinates.java"; import JavaUpdateAnnotationStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/java/update_annotation_status.java";

import PHPAnnotateExistingRegionsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/annotate_existing_regions_image.php"; import PHPAnnotateImagesConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/annotate_images_concepts.php"; import PHPAnnotateImagesUserIdStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/annotate_images_user_id_status.php"; import PHPAnnotateNewBoundingBoxesImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/annotate_new_bounding_boxes_image.php"; import PHPAnnotatePolygonsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/annotate_polygons_image.php"; import PHPbulkDeleteAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/bulk_delete_annotations_input_annotation_ids.php"; import PHPBulkDeleteAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/bulk_delete_annotations_input_ids.php"; import PHPDeleteAnnotationInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/delete_annotation_input_annotation_ids.php"; import PHPListAllAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/list_all_annotations_app.php"; import PHPListAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/list_annotations_input_annotation_ids.php"; import PHPListAnnotationsModelVersionIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/list_annotations_model_version_ids.php"; import PHPListAnnotationsUserIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/list_annotations_user_ids.php"; import PHPlistUserCreatedAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/list_user_created_annotations_app.php"; import PHPListUserCreatedAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/list_user_created_annotations_input_ids.php"; import PHPUpdateAnnotationConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/update_annotation_concepts.php"; import PHPUpdateAnnotationConceptsRegion from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/update_annotation_concepts_region.php"; import PHPUpdateAnnotationRegionCoordinates from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/update_annotation_region_coordinates.php"; import PHPUpdateAnnotationStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/php/update_annotation_status.php";

import CurlAnnotateExistingRegionsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/annotate_existing_regions_image.sh"; import CurlAnnotateImagesConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/annotate_images_concepts.sh"; import CurlAnnotateImagesUserIdStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/annotate_images_user_id_status.sh"; import CurlAnnotateNewBoundingBoxesImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/annotate_new_bounding_boxes_image.sh"; import CurlAnnotatePolygonsImage from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/annotate_polygons_image.sh"; import CurlbulkDeleteAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/bulk_delete_annotations_input_annotation_ids.sh"; import CurlBulkDeleteAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/bulk_delete_annotations_input_ids.sh"; import CurlDeleteAnnotationInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/delete_annotation_input_annotation_ids.sh"; import CurlListAllAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/list_all_annotations_app.sh"; import CurlListAnnotationsInputAnnotationIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/list_annotations_input_annotation_ids.sh"; import CurlListAnnotationsModelVersionIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/list_annotations_model_version_ids.sh"; import CurlListAnnotationsUserIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/list_annotations_user_ids.sh"; import CurllistUserCreatedAnnotationsApp from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/list_user_created_annotations_app.sh"; import CurlListUserCreatedAnnotationsInputIds from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/list_user_created_annotations_input_ids.sh"; import CurlUpdateAnnotationConcepts from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/update_annotation_concepts.sh"; import CurlUpdateAnnotationConceptsRegion from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/update_annotation_concepts_region.sh"; import CurlUpdateAnnotationRegionCoordinates from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/update_annotation_region_coordinates.sh"; import CurlUpdateAnnotationStatus from "!!raw-loader!../../../code_snippets/api-guide/annotate/curl/update_annotation_status.sh";

Add Annotations

You can label your inputs by calling the POST /annotations endpoint. For example, you can add concept(s) to an image, draw a bounding box, or label concept(s) in a video frame.

When you add an annotation, the app's default workflow will be run by default. This means that any newly added annotations will be immediately available for AI based search and training.

:::tip You can add from 1 up to 128 annotations in a single API call. :::

Each annotation should contain at most one region. If it is a video, each annotation should contain 1 frame. If there are multiple regions in a frame you want to label, you can add multiple annotations for each region and each annotation will be contained within the same frame but in a different region.

:::info

The initialization code used in the following examples is outlined in detail on the client installation page.

:::

Annotate Images With Concepts

Below is an example of how to annotate a concept present anywhere in an image.

{PythonAnnotateImagesConcepts} {JSAnnotateImagesConcepts} {NodeAnnotateImagesConcepts} {JavaAnnotateImagesConcepts} {PHPAnnotateImagesConcepts} {CurlAnnotateImagesConcepts}

Annotate Images With Multiple Concepts

Below is an example of how to annotate an image with multiple concepts in a single API call. You can provide the concepts in a list and iterate through it.

{PythonAnnotateImagesMultipleConcepts} {JSAnnotateImagesMultipleConcepts} {NodeAnnotateImagesMultipleConcepts}

Annotate New Bounding Boxes in an Image

Below is an example of how to label a new rectangular bounding box for a region.

These are the bounding box coordinates you need to provide:

  • top_row—The top left of the bounding box normalized to the data dimension to be within [0-1.0];
  • left_col—The left column of the bounding box normalized to the data dimension to be within [0-1.0];
  • bottom_row—The bottom row of the bounding box normalized to the data dimension to be within [0-1.0];
  • right_col—The right col of the bounding box normalized to the data dimension to be within [0-1.0].
{PythonAnnotateNewBoundingBoxesImage} {JSAnnotateNewBoundingBoxesImage} {NodeAnnotateNewBoundingBoxesImage} {JavaAnnotateNewBoundingBoxesImage} {PHPAnnotateNewBoundingBoxesImage} {CurlAnnotateNewBoundingBoxesImage}

Annotate Polygons in an Image

Below is an example of how to provide annotations within any polygon-shaped region of an image.

These are the list of points that connect together to form a polygon:

  • row—The row location of the point. This has a [0.0-1.0] range with 0.0 being top row and 1.0 being the bottom row;
  • col—The column location of the point. This has a [0.0-1.0] range with 0.0 being left col and 1.0 being the right col;
  • z—Depth, if applicable, of the point.
{PythonAnnotatePolygonsImage} {JSAnnotatePolygonsImage} {NodeAnnotatePolygonsImage} {JavaAnnotatePolygonsImage} {PHPAnnotatePolygonsImage} {CurlAnnotatePolygonsImage}

Annotate Existing Regions in an Image

When you add an input, detection models (such as Face Detection or General Detection) will detect regions in your image where there appear to be relevant objects. You can get the IDs of these detected regions by listing model's annotations.

Your labels should be contained within Region.data. Each annotation can only have 1 region. If you want to label multiple regions, it is possible to label multiple annotations in a single API call.

Below is an example of how to annotate existing regions in an image.

{PythonAnnotateExistingRegionsImage} {JSAnnotateExistingRegionsImage} {NodeAnnotateExistingRegionsImage} {JavaAnnotateExistingRegionsImage} {PHPAnnotateExistingRegionsImage} {CurlAnnotateExistingRegionsImage}

Annotate Images With Different user_id and status

Each annotation is tied to a user or a model in your workflow. By default, when a user posts an annotation, this user is the owner of the annotation.

Sometimes, however, you might want to post an annotation as another user; for example, when assigning an image to another user. In such a case, you can create an annotation with another user_id (and status PENDING).

:::important note

Only the app owner can post an annotation with other user's user_id; collaborators cannot.

:::

Below is an example of how to annotate images with different user_id and status.

{PythonAnnotateImagesUserIdStatus} {JSAnnotateImagesUserIdStatus} {NodeAnnotateImagesUserIdStatus} {JavaAnnotateImagesUserIdStatus} {PHPAnnotateImagesUserIdStatus} {CurlAnnotateImagesUserIdStatus}

List Annotations

You can get a list of annotations within your app with a GET call. Annotations will be returned from oldest to newest.

These requests are paginated. By default each page will return 20 annotations.

List All User Created Annotations in Your App

Below is an example of how to list all your user labelled annotations.

:::important note

This will not show annotations by models in your workflow. To include model created annotations, you need to set list_all_annotations to True.

:::

{PythonlistUserCreatedAnnotationsApp} {JSlistUserCreatedAnnotationsApp} {NodelistUserCreatedAnnotationsApp} {JavalistUserCreatedAnnotationsApp} {PHPlistUserCreatedAnnotationsApp} {CurllistUserCreatedAnnotationsApp}

List All Annotations in Your App

Below is an example of how to list all annotations, including those created by models.

{PythonListAllAnnotationsApp} {JSListAllAnnotationsApp} {NodeListAllAnnotationsApp} {JavaListAllAnnotationsApp} {PHPListAllAnnotationsApp} {CurlListAllAnnotationsApp}

List User Created Annotations by Input IDs

Below is an example of how to list all user created annotations for certain input (one or several) by providing a list of input IDs.

:::important note

This will not show annotations by models in your workflow. To include model created annotations, you need to set list_all_annotations to True.

:::

{PythonListUserCreatedAnnotationsInputIds} {JSListUserCreatedAnnotationsInputIds} {NodeListUserCreatedAnnotationsInputIds} {JavaListUserCreatedAnnotationsInputIds} {PHPListUserCreatedAnnotationsInputIds} {CurlListUserCreatedAnnotationsInputIds}

List Annotations by Input IDs and Annotation IDs

You can list annotations by input IDs and their corresponding annotation IDs. Number of input IDs and annotation IDs should be the same. Since we are finding annotation by IDs, this will match any user or model created annotations.

Below is an example of how to do that.

:::tip

  • When listing annotations, both input IDs and annotation IDs are optional. If you do not provide any input ID or annotation ID, we will return all annotations based on the creation time of each input.

  • You can also list annotations by providing input IDs only.

  • However, if you want to list annotations by providing annotation IDs, then input IDs are also required so that we know the inputs that correspond to the annotation IDs provided in the request. In this case, the number of input IDs should be equal to the number of annotation IDs.

:::

{PythonListAnnotationsInputAnnotationIds} {JSListAnnotationsInputAnnotationIds} {NodeListAnnotationsInputAnnotationIds} {JavaListAnnotationsInputAnnotationIds} {PHPListAnnotationsInputAnnotationIds} {CurlListAnnotationsInputAnnotationIds}

List Annotations by User IDs

An annotation is created by either a user or a model. You can list annotations created by specific user(s) by providing their user IDs.

Below is an example of how to do that.

{PythonListAnnotationsUserIds} {JSListAnnotationsUserIds} {NodeListAnnotationsUserIds} {JavaListAnnotationsUserIds} {PHPListAnnotationsUserIds} {CurlListAnnotationsUserIds}

List Annotations by Model Version IDs

An annotation is created by either a user or a model. For example, if your workflow has a detection model, when you add an input, the model will detect objects in your input. You can see these detected objects by listing the annotations created in the detection model.

You can also label these regions by using Post annotation with the region ID returned from this call.

Below is an example of how to list annotations by model version IDs.

{PythonListAnnotationsModelVersionIds} {JSListAnnotationsModelVersionIds} {NodeListAnnotationsModelVersionIds} {JavaListAnnotationsModelVersionIds} {PHPListAnnotationsModelVersionIds} {CurlListAnnotationsModelVersionIds}

Update Annotations

Changing annotation data is possible by PATCHing existing annotations. The application owner can change any user-created annotations. Collaborators are not allowed to change annotations made by other collaborators.

Generally speaking, you should send PATCH when you want to change the data you have posted; for example, changing the concept from positive to negative or adjusting the bounding box coordinates.

If you want to add more tags, you can always POST new annotations. There is no limit on how many annotations an input can have.

Update supports overwrite, merge, and remove actions. You can update from 1 up to 128 annotations in a single API call.

Update Annotation With Concepts

Below is an example of how to update an annotation of an image with a new concept, or change a concept value from true to false (or vice versa).

{PythonUpdateAnnotationConcepts} {JSUpdateAnnotationConcepts} {NodeUpdateAnnotationConcepts} {JavaUpdateAnnotationConcepts} {PHPUpdateAnnotationConcepts} {CurlUpdateAnnotationConcepts}

Update Annotation With Concepts in a Region

When you update region data, you must nest this new data within region.data. Set the region_id to the current region_id if you do not want to change or remove this region.

Below is an example of how to update annotation with concepts in a region.

{PythonUpdateAnnotationConceptsRegion} {JSUpdateAnnotationConceptsRegion} {NodeUpdateAnnotationConceptsRegion} {JavaUpdateAnnotationConceptsRegion} {PHPUpdateAnnotationConceptsRegion} {CurlUpdateAnnotationConceptsRegion}

Update Annotation Region Coordinates

You can update region bounding boxes coordinates. When changing the region, you should use overwrite action. With overwrite action, you need to provide the data you want to keep in this annotation.

Below is an example of how to do that.

{PythonUpdateAnnotationRegionCoordinates} {JSUpdateAnnotationRegionCoordinates} {NodeUpdateAnnotationRegionCoordinates} {JavaUpdateAnnotationRegionCoordinates} {PHPUpdateAnnotationRegionCoordinates} {CurlUpdateAnnotationRegionCoordinates}

Update Annotation Status

Below is an example of how to update an annotation status.

{PythonUpdateAnnotationStatus} {JSUpdateAnnotationStatus} {NodeUpdateAnnotationStatus} {JavaUpdateAnnotationStatus} {PHPUpdateAnnotationStatus} {CurlUpdateAnnotationStatus}

Delete Annotations

Delete Annotation by Input ID and Annotation ID

Below is an example of how to delete a single annotation by input ID and annotation ID.

{PythonDeleteAnnotationInputAnnotationIds} {JSDeleteAnnotationInputAnnotationIds} {NodeDeleteAnnotationInputAnnotationIds} {JavaDeleteAnnotationInputAnnotationIds} {PHPDeleteAnnotationInputAnnotationIds} {CurlDeleteAnnotationInputAnnotationIds}

Bulk Delete Annotations by Input IDs and Annotation IDs

You can delete multiple annotations in one API call. You need to provide a list of input IDs and a list of annotation IDs. The number of input IDs has to match the number of annotation IDs.

Below is an example of how to do that.

{PythonbulkDeleteAnnotationsInputAnnotationIds} {JSbulkDeleteAnnotationsInputAnnotationIds} {NodebulkDeleteAnnotationsInputAnnotationIds} {JavabulkDeleteAnnotationsInputAnnotationIds} {PHPbulkDeleteAnnotationsInputAnnotationIds} {CurlbulkDeleteAnnotationsInputAnnotationIds}

Bulk Delete All Annotations by Input IDs

To delete all annotations of a given input, you just need to set their input ID(s). This will delete all annotations for these input(s), EXCEPT the input level annotations, which only get deleted if you delete the inputs themselves.

Below is an example of how to do that.

{PythonBulkDeleteAnnotationsInputIds} {JSBulkDeleteAnnotationsInputIds} {NodeBulkDeleteAnnotationsInputIds} {JavaBulkDeleteAnnotationsInputIds} {PHPBulkDeleteAnnotationsInputIds} {CurlBulkDeleteAnnotationsInputIds}