"Validation error" when sending predictions from backend
VladimirTalyzin opened this issue · 1 comments
I'm experiencing a "Validation error" in Label Studio when sending predictions from my backend.
Steps to Reproduce:
- I'm sending a POST request to
/predict
endpoint with the following JSON payload:{ "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": "<View>\n <Image name=\"image\" value=\"$image\"/>\n <BrushLabels name=\"label\" toName=\"image\">\n <Label value=\"Road\" background=\"#d55d2a\"/>\n <Label value=\"Lake\" background=\"#9edfff\"/>\n </BrushLabels>\n</View>", "params": { "login": null, "password": null, "context": null } }
- I'm receiving a
200 OK
response with the following 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.