HumanSignal / HumanSignal/label-studio-ml-backend
"Validation error" when sending predictions from backend
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 490
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
I'm experiencing a "Validation error" in Label Studio when sending predictions from my backend.
**Steps to Reproduce:**
1. I'm sending a POST request to `/predict` endpoint with the following JSON payload:
```json
{
"tasks": [
{
"id": 2018,
"data": {
"image": "/data/upload/1/b4478d38-ROAD.png"
},
// ... (other task data) ...
"annotations": [
{
"id": 2020,
// ... (other annotation data) ...
"result": [
{
"original_width": 1742,
"original_height": 822,
"image_rotation": 0,
"value": {
"format": "rle",
"rle": [
0,
87,
101,
208,
57,
...
0
],
"brushlabels": [
"Road"
]
},
"id": "BUtbw4Jm5J",
"from_name": "label",
"to_name": "image",
"type": "brushlabels",
"origin": "manual"
}
],
// ... (other annotation data) ...
}
],
"predictions": []
}
],
"project": "4.1716665460",
"label_config": "\n \n \n \n \n \n",
"params": {
"login": null,
"password": null,
"context": null
}
}
```
2. I'm receiving a `200 OK` response with the following JSON:
```json
[
{
"result": {
"from_name": "What's in here",
"to_name": "To write",
"type": "brushlabels",
"value": {
"format": "rle",
"rle": [
0,
21,
217,
116,
...
0
],
"brushlabels": [
"Road"
]
},
"original_width": 1742,
"original_height": 822,
"image_rotation": 0
}
}
]
```
**Expected Behavior:**
The prediction should be displayed in Label Studio.
**Actual Behavior:**
Instead of the prediction, I get a generic "Validation error" message.
**Troubleshooting:**
I've tried sending simple predictions (e.g., a rectangle) with no success. The error persists, making it difficult to debug the issue.
**Previous version:**
In the previous version of Label Studio, the prediction process was clearer. The new version lacks clear instructions and debugging tools, making it difficult to diagnose and fix this problem.
**Please help me understand:**
- What's wrong with the data my model is sending?
- How can I debug this "Validation error" and ensure proper prediction display in Label Studio?
**Additional notes:**
- The `rle` data is encoded according to the Label Studio format. I've checked the documentation and my code, but I can't find any errors.
- I've tried multiple versions of Label Studio (1.11.x, 1.12.1), but the issue persists.
I appreciate your assistance in resolving this issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.