Labelbox documentation

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.

An easy way to access your video frame labels is in the Postman UI.

Steps:

  1. Open Postman and create a new basic API request.

  2. Copy the URL for frames and paste it as the request URL.

  3. Go to the Headers tab.

  4. Select Authorization as the key.

  5. Paste your API key as the Authorization value.

  6. Click send.

To access the URL containing the information for the labeled frames, place your API key in the authorization header. To see an example, see the authentication docs in our GraphQL section.

The endpoint this URL points to may return an 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 an 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:

import requests

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).

Multi-frame bounding box

The following export sample includes a single frame with 0 global classifications and 1 bounding box containing 1 child checklist classification.

When keyframe is true, it means that a labeler created or made an adjustment to the annotation on that frame. When keyframe is false, it means the annotation was auto-populated or interpolated on that frame.

{
    "frameNumber": 34,
    "classifications": [],
    "objects": [
        {
            "featureId": "<BBOX-OBJECT-FEATURE-ID>",
            "schemaId": "<BBOX-OBJECT-SCHEMA-ID>",
            "title": "Car 1",
            "value": "car_1",
            "color": "#1CE6FF",
            "keyframe": false,
            "bbox": {
                "top": 1164,
                "left": 2538,
                "height": 222,
                "width": 119
            },
            "classifications": [
                {
                    "featureId": "<NESTED-CHECKLIST-QUESTION-FEATURE-ID>",
                    "schemaId": "<NESTED-CHECKLIST-QUESTION-SCHEMA-ID>",
                    "title": "Visibility",
                    "value": "visibility",
                    "answer": {
                        "featureId": "<NESTED-CHECKLIST-ANSWER-FEATURE-ID>",
                        "schemaId": "<NESTED-CHECKLIST-ANSWER-SCHEMA-ID>",
                        "title": "1",
                        "value": "1",
                        "keyframe": true
                    }
                }
            ]
        }
    ]
}

Point

The following export sample includes a single frame with 0 global classifications and 1 point annotation containing a child radio classification.

When keyframe is true, it means that a labeler created or made an adjustment to the annotation on that frame. When keyframe is false, it means the annotation was auto-populated or interpolated on that frame.

{
    "frameNumber": 2,
    "classifications": [],
    "objects": [
        {
            "featureId": "<POINT-OBJECT-FEATURE-ID>",
            "schemaId": "<POINT-OBJECT-SCHEMA-ID>",
            "title": "right_shoulder",
            "value": "right_shoulder",
            "color": "#006FA6",
            "keyframe": true,
            "point": {
                "x": 1279,
                "y": 496
            },
            "classifications": [
                {
                    "featureId": "<NESTED-RADIO-QUESTION-FEATURE-ID>",
                    "schemaId": "<NESTED-RADIO-QUESTION-SCHEMA-ID>",
                    "title": "Visibility",
                    "value": "visibility",
                    "answer": {
                        "featureId": "<NESTED-CHECKLIST-ANSWER-FEATURE-ID>",
                        "schemaId": "<NESTED-RADIO-ANSWER-SCHEMA-ID>",
                        "title": "2",
                        "value": "2",
                        "keyframe": false
                    }
                }
            ]
        }
    ]
}

Classifications

The following export sample contains 2 global classifications: radio and checklist.

When keyframe is true, it means that a labeler created or made an adjustment to the annotation on that frame. When keyframe is false, it means the annotation was auto-populated or interpolated on that frame.

{
    "frameNumber": 98,
    "classifications": [
        {
            "featureId": "<RADIO-QUESTION-FEATURE-ID>",
            "schemaId": "<RADIO-QUESTION-SCHEMA-ID>",
            "title": "Visibility",
            "value": "visibility",
            "answer": {
                "featureId": "<RADIO-ANSWER-FEATURE-ID>",
                "schemaId": "<RADIO-ANSWER-SCHEMA-ID>",
                "title": "1",
                "value": "1",
                "keyframe": true
            }
        },
        {
            "featureId": "<CHECKLIST-QUESTION-FEATURE-ID>",
            "schemaId": "<CHECKLIST-QUESTION-SCHEMA-ID>",
            "title": "Car moving",
            "value": "car_moving",
            "answers": {
                "featureId": "cklmstam500033h6814oc0odv",
                "schemaId": "ckkojo9o5073a0ycag4uthoys",
                "title": "Yes",
                "value": "yes",
                "keyframe": false
            }
        }
    ],
    "objects": []
}