Skip to main content

Open In Colab

GitHub

Export as JSON

Annotation export formats

Bounding box

Point

Polyline

Mask

Regardless of which tool is used to create a segmentation mask, the annotation will appear in the following form in the export. Whether you use AutoSegment, the brush tool, the pen tool, or the fill tool, all masks take the same format in exports.

Composite masks

Open this Colab for an interactive tutorial on exporting composite masks. A composite mask is a cloud-hosted PNG file that contains all raster segmentation mask instances on a labeled data row (one composite mask per label). This screenshot shows an example composite mask in PNG format. Here, the image has eight segmentation mask instances, each using the schema named “Human”.

A labeled data row containing 8 instances of a segmentation mask named "Human".

When you export data rows containing segmentation masks, you can use composite_mask.url to access all segmentation masks on that data row. To access a single instance of a segmentation mask, use the color_rgb values. The color_rgb value represents the color of a single annotation or instance mask in a label.
Sample composite masks export

Access mask data

To access the mask data, you must pass your Labelbox API key stored in client.headers in an API request. When you grab a URL from the mask annotation in the export, the project_id and feature_id will already be in place, as shown above. Here, we provide the framework for structuring a URL with any project ID and feature ID.

Classification - Radio

Classification - Checklist

Classification - Free-form text

Sample project export

Sample model run export