Skip to main content

Open In Colab

GitHub

Supported prediction types

To upload predictions in Labelbox, you need to create a predictions payload. This section shows how to declare payloads for each supported prediction type. You can declare payloads using Python annotation types (preferred) or as NDJSON objects. Confidence scores are optional. If you do not include confidence scores in your prediction payloads, the prediction is treated as if it had a confidence value of one (1).

Entity

Classification: radio (single choice)

Classification: radio nested

Classification: checklist nested

Classification: checklist (multiple choice)

Classification: free-form text

Example: Upload predictions to model run

To upload predictions to a model run:

Before you start

These examples require the following libraries:
Replace the value of API_KEY with a valid API key to connect to the Labelbox client.

Step 1: Import data rows into Catalog

Step 2: Set up ontology for predictions

Your model run ontology should support all tools and classifications required by your predictions. this example shows how to create an ontology containing all supported prediction types.

Step 3: Create model and model run

Step 4: Send data rows to model run

Step 5: Create prediction payloads

See supported prediction types for help creating prediction payloads. You can declare predictions as Python annotation types (preferred) or NDJSON objects. These examples show each type and describe how to compose predictions into labels attached to the data rows. The resulting label_ndjson_predictions and label_predictions payloads should have exactly the same prediction content (except for the uuid string values).

Step 6: Upload payload to model run

Step 7: Send annotations to model run

This step is optional.