Table of Contents

Label export formats

Alex Cota Updated by Alex Cota

This page includes all of the export formats for the image, text, and video labeling tools. Tiled Imagery export format is not included.

Images

To access the instanceURI mask, make sure you have the proper authentication, then append a query parameter to the end of the URL.

Masks

The Image segmentation tool produces a per-instance semantic mask which you can access via the instanceURI. This format supports Panoptic (instance) segmentation, so each object instance will be one row in your export file.

"Label": { 
"objects": [
{
"featureId": "ck9bmetz800340za5k073bm7w",
"schemaId": "ck9blmq1lnlxz08892qqlmxto",
"title": "sample-mask",
"value": "sample-mask",
"color": "#2BFF00",
"instanceURI": "https://api.labelbox.com/masks/feature/ck9bme..."
}
],
"classifications": []
}

Bounding boxes

The geometric key for Bounding boxes contain coordinates for the top left corner as well as height and width measurements.

top

Ymin value

left

Xmin value

"Label": { 
"objects": [
{
"featureId": "ck9bmeej61emf0yf5bgjb4tjw",
"schemaId": "ck9blmq1lnlxw08895jy7zsk4",
"title": "sample-bbox",
"value": "sample-bbox",
"color": "#FF8000",
"bbox": {
"top": 186,
"left": 192,
"height": 300,
"width": 519
},
"instanceURI": "https://api.labelbox.com/masks/feature/ck9bmeej61emf0yf5bgjb4tjw..."
}
],
"classifications": []
}

Polygons

The x,y coordinates for Polygons are listed in the order that they were initially created (points added after initial creation will be inserted in the proper position).

"Label": { 
"objects": [
{
"featureId": "ck9blnafk1d070yf5bhq4q1fv",
"schemaId": "ck9blmq1lnlxv0889cu4r18mx",
"title": "sample-polygon",
"value": "sample-polygon",
"color": "#FF0000",
"polygon": [
{
"x": 3665.814,
"y": 351.628
},
{
"x": 3762.93,
"y": 810.419
},
{
"x": 3042.93,
"y": 914.233
},
{
"x": 2996.047,
"y": 864
},
{
"x": 3036.233,
"y": 753.488
}
],
"instanceURI": "https://api.labelbox.com/masks/feature/ck9..."
}
],
"classifications": []
}

Polylines

For Polylines, the coordinates in the geometric key are in clockwise direction.

"Label": { 
"objects": [
{
"featureId": "ck9bmejeu00c20ya10woo1ml5",
"schemaId": "ck9blmq1lnlxx088964dfy107",
"title": "sample-polyline",
"value": "sample-polyline",
"color": "#FFFF00",
"line": [
{
"x": 328.535,
"y": 308.215
},
{
"x": 613.242,
"y": 735.277
},
{
"x": 958.026,
"y": 907.668
},
{
"x": 1352.437,
"y": 905.056
}
],
"instanceURI": "https://api.labelbox.com/masks/feature/ck9bmejeu00c20ya10woo1ml5?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJjazhwNTVueDYzdG45MDgxMWM3Z3p6dXYyIiwib3JnYW5pemF0aW9uSWQiOiJjamhmbjV5NnMwcGs1MDcwMjRuejFvY3lzIiwiaWF0IjoxNTg3NTc3MTI3LCJleHAiOjE1OTAxNjkxMjd9.U5wynJzDMe3ReL71CTzTZO7aojp1GI2TzaIpNK89XaI"
}
],
"classifications": []
}

Points

Points do not support sub-pixel placement.

"Label": { 
"objects": [
{
"featureId": "ck9bmemy91hic10bogwc6sygv",
"schemaId": "ck9blmq1lnlxy0889stzln2ms",
"title": "sample-point",
"value": "sample-point",
"color": "#D4FF00",
"point": {
"x": 116,
"y": 98
},
"instanceURI": "https://api.labelbox.com/masks/feature/..."
}
],
"classifications": []
}

Classification

The Image classification tool produces a semantic classification with no geometric information. The four classification types are radio, checklist, dropdown, and text classification.

"Label": {
"objects": [],
"classifications": [
{
"featureId": "ck9bloche1fy910bom8fgji90",
"schemaId": "ck9blmq1lnlxs0889u7xa8byw",
"title": "Free text question",
"value": "free_text_question",
"answer": "sample text"
},
{
"featureId": "ck9bloham1d1b0yf5870yxzxp",
"schemaId": "ck9blmq4ifi4b09760b4ur5ih",
"title": "Radio question",
"value": "radio_question",
"answer": {
"featureId": "ck9blohbp1d1c0yf523u34azb",
"schemaId": "ck9blmq1lnlxo0889u50lm3dx",
"title": "Yes",
"value": "yes"
}
},
{
"featureId": "ck9bloipe005h10evp9txzhi6",
"schemaId": "ck9blmq4jfi4c0976jzdlk2fw",
"title": "Checklist question",
"value": "checklist_question",
"answers": [
{
"featureId": "ck9bloiqc005i10evlzlv90v5",
"schemaId": "ck9blmq1lnlxq0889oy9h5596",
"title": "Red",
"value": "red"
},
{
"featureId": "ck9blojbm1doo0zdga69rzqdj",
"schemaId": "ck9blmq1lnlxr08893iamqxcz",
"title": "Blue",
"value": "blue"
}
]
},
{
"featureId": "ck9nedyfw05v91276aqbzfsnj",
"schemaId": "ck9nedt5a1kgw0y6tnj17m2i2",
"title": "Dropdown question",
"value": "dropdown_question",
"answer": [
{
"featureId": "ck9nedyhm05va127627ypedfy",
"schemaId": "ck9nedt701kh20y6tqoxgndvv",
"title": "Answer",
"value": "answer"
},
{
"featureId": "ck9nedyi305vb12764xxeuypd",
"schemaId": "ck9nedt8a1khb0y6t37ylx1rb",
"title": "Nested answer",
"value": "nested_answer"
}
]
}
]
}

Nested classification

Nested classifications appear under objects. The four classification types are radio, checklist, dropdown, and text classification.

"Label": { 
"objects": [
{
"featureId": "ck9nkjj6j03341081z1d9dpd4",
"schemaId": "ck9nkgekg00vz109la501ywx2",
"title": "Sample polygon",
"value": "sample-polygon",
"color": "#FF0000",
"instanceURI": "https://api.labelbox.com/masks/feature/ck9nkjj6j03341081z1d9dpd4?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJjazUycnZ4MWtxYXpiMDc3MDBtcTI3eDRsIiwib3JnYW5pemF0aW9uSWQiOiJjazUycnZ4MG1wdzRnMDc2NndncXZqdGw5IiwiaWF0IjoxNTg4Mjk5NTY3LCJleHAiOjE1OTA4OTE1Njd9.vlI_0QUG-wJHZwdk3IZX1E59VAiTkMiF41-QyD1jIGs",
"classifications": [
{
"featureId": "ck9nkjl5d03iu0z945fhjo1gb",
"schemaId": "ck9nkjdm703bl1064fn42xtn5",
"title": "Nested classification",
"value": "nested_classification",
"answer": {
"featureId": "ck9nkjl6f03iv0z94ewv0s74j",
"schemaId": "ck9nkjdnq03bu1064oy6qimtn",
"title": "Answer 1",
"value": "answer_1"
}
}
]
}
]
}

Text

Named Entity Recognition

The Named Entity Recognition (NER) tool is used to label words or phrases in unstructured text.

"Label": { 
"objects": [
{
"featureId": "ck8kulppv000x0yf8pqpqqin4",
"schemaId": "ck8kukafkqx1a0880iczbrqym",
"title": "Entity type A",
"value": "entity_type_a",
"color": "#8000FF",
"version": 1,
"format": "text.location",
"data": {
"location": {
"start": 67,
"end": 128,
"text": "Hereditary Endotheliopathy..."
}
}
}
]
}

Video

When you export your Labels, the export will contain a Label element for each video in the project. Each Label will contain a URL to an NDJSON file containing the information for the labeled frames in that video.

To access the URL containing the information for the labeled frames, place your API key in the authorization header. For an example, see method 1 in the authorization section of our Getting started page.

The endpoint this URL points to may return a HTTP 301 response. If this happens, the HTTP response will contain a Location header with the download URL.

If the label is skipped and has no data, the endpoint will return a HTTP 204 response.

"Label": {
"frames": "<URL-TO-NDJSON-FILE>"
}

Bash example for accessing the frames:

curl -L -H "Authorization: Bearer $API_KEY"  $FRAMES_URL > $FRAMES_FILE_LOCATION

Python example for accessing the frames:

headers = {'Authorization': f"Bearer {API_KEY}"}
ndjson_response = requests.get(frames_url, headers=headers)

Each element in the NDJSON file represents a labeled frame in the video (unlabeled frames will not be included).

{ 
"frameNumber": 1,
"objects": [
{
"featureId": "<BBOX-OBJECT-FEATURE-ID>",
"schemaId": "<BBOX-OBJECT-SCHEMA-ID>",
"title": "<BBOX-NAME>",
"value": "<BBOX-NAME>",
"color": "#FF8000",
"bbox": {
"height": 272,
"left": 111,
"top": 137,
"width": 324
},
"classifications": [
{
"featureId": "<NESTED-RADIO-QUESTION-FEATURE-ID>",
"schemaId": "<NESTED-RADIO-QUESTION-SCHEMA-ID>",
"title": "Nested Radio question",
"value": "nested_radio_question",
"answer": {
"featureId": "<NESTED-RADIO-ANSWER-FEATURE-ID>",
"schemaId": "<NESTED-RADIO-ANSWER-SCHEMA-ID>",
"title": "Answer 1",
"value": "answer_1"
}
},
{
"featureId": "<NESTED-CHECKLIST-QUESTION-FEATURE-ID>",
"schemaId": "<NESTED-CHECKLIST-QUESTION-SCHEMA-ID>",
"title": "Nested Checklist question",
"value": "nested_checklist_question",
"answers": [
{
"featureId": "<NESTED-CHECKLIST-ANSWER-FEATURE-ID>",
"schemaId": "<NESTED-CHECKLIST-ANSWER-SCHEMA-ID>",
"title": "Option 1",
"value": "option_1"
},
...
]
}
]
}
],
"classifications": [
{
"featureId": "<QUESTION-FEATURE-ID>",
"schemaId": "<QUESTION-SCHEMA-ID>",
"title": "Radio question",
"value": "radio_question",
"answer": {
"featureId": "<RADIO-ANSWER-FEATURE-ID>",
"schemaId": "<RADIO-ANSWER-SCHEMA-ID>",
"title": "Yes",
"value": "yes"
}
},
{
"featureId": "<CHECKLIST-QUESTION-FEATURE-ID>",
"schemaId": "<CHECKLIST-QUESTION-SCHEMA-ID>",
"title": "Checklist question",
"value": "checklist_question",
"answers": [
{
"featureId": "<CHECKLIST-ANSWER-FEATURE-ID>",
"schemaId": "<CHECKLIST-ANSWER-SCHEMA-ID>",
"title": "Option X",
"value": "option_x"
},
...
]
}
]
}

COCO or PASCAL VOC

Labelbox does not offer any direct export options for COCO or PASCAL VOC. Users still using the Legacy editor can use the conversion scripts in this open source package to convert a JSON format to COCO or VOC format.

Was this page helpful?

How to export labels

Contact