The Prediction feature in Label Studio allows users to upload pre-annotations (predictions) to accelerate labeling workflows. These predictions can come from external machine learning models or previous labeling runs. Users can upload prediction files in supported formats (e.g., JSON) alongside task data to pre-populate annotations.
How Predictions Work
Users upload task data with optional prediction annotations.
Label Studio matches the predictions against the Label Configuration of the project.
If predictions align with the Label Configuration, they are imported automatically.
Annotators can review, adjust, or approve predictions during labeling.
Recent Changes: Validation Steps
To improve data consistency and integrity, Label Studio now performs additional validation on imported predictions:
Validation against Label Configuration:
Each prediction is checked to ensure that its labels exist in the current project’s Label Configuration.Data integrity checks:
Predictions must follow the expected format for the task type (e.g., bounding boxes, polygons, text spans).
Impact:
Some predictions that were accepted previously may now trigger validation errors if:
The label does not exist in the Label Configuration.
The prediction format does not fully comply with the expected schema.
Common Validation Errors
| Error | Cause | Suggested Action |
|---|---|---|
AttributeError: 'NoneType' object has no attribute 'id' | User does not have an active organization | Ensure user is assigned to an active organization before importing predictions |
| Label not found in Label Configuration | Prediction contains a label that is missing in the project | Update prediction file or project Label Configuration to match |
| Invalid prediction format | Bounding boxes, polygons, or text spans do not comply with schema | Check the format of the uploaded prediction file |
Best Practices
Use smaller subsets for testing
Large prediction files may trigger multiple errors simultaneously. Testing with smaller datasets helps isolate issues.
Verify Label Configuration alignment
Ensure all predicted labels exist in the project before uploading.
Pre-validate prediction files
Optional: Use scripts to validate prediction format before importing.
Known Limitations
Large prediction datasets can trigger multiple validation errors at once, causing confusion.
Some legacy workflows may be impacted if predictions were previously accepted without validation.