Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Validation error" when sending predictions from backend #550

Open
VladimirTalyzin opened this issue May 26, 2024 · 1 comment
Open

"Validation error" when sending predictions from backend #550

VladimirTalyzin opened this issue May 26, 2024 · 1 comment

Comments

@VladimirTalyzin
Copy link

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:
    {
      "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
      }
    }
  2. 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.

@VladimirTalyzin
Copy link
Author

validation_error

@sajarin sajarin transferred this issue from HumanSignal/label-studio May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant