Add Segmentation Annotations

๐Ÿ“˜

Click for Python SDK

Dataset.annotate(
    annotations: List[SegmentationAnnotation],
    update: bool,
    asynchronous: bool
) -> Union[dict, AsyncJob]

When uploading a mask annotation, Nucleus expects the mask file to be in PNG format. Currently, Nucleus only supports uploading masks from URL (local upload coming soon). For each mask, specify the mask_url, as well as the DatasetItem you are annotating. A DatasetItem can be referenced by either its internal ID, or the reference ID you provided when uploading the image.

Nucleus automatically enforces the constraint that each DatasetItem can have at most one ground truth segmentation mask. As a consequence, if during upload a duplicate mask is detected for a given image, by default it will be ignored. You can change this behavior by specifying the optional 'onConflict' flag. Setting the 'onConflict' flag to 'update' will replace the existing segmentation with the new mask specified in the request body.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!