HumanSignal / label-studio-ml-backend

Configs and boilerplates for Label Studio's Machine Learning backend
Apache License 2.0
575 stars 260 forks source link

Not getting annotation.result[N].id while generation prediction using API. #392

Open AkashDataScience opened 11 months ago

AkashDataScience commented 11 months ago

I am using ML backend for detection. Initially, prediction API will return predictions with annotation.result[N].id. Now, I am not getting annotation.result[N].id. I need this to add results of recognition task.

Result of old call:

{
  "original_width": 1717,
  "original_height": 697,
  "image_rotation": 0,
  "value": {
    "x": 7.92712599392253,
    "y": 15.064562410329993,
    "width": 17.592293634106735,
    "height": 3.4433285509325664,
    "rotation": 0,
    "rectanglelabels": [
      "ABC"
    ]
  },
  "id": "tofXOU8lTd",
  "from_name": "label_rectangles",
  "to_name": "image",
  "type": "rectanglelabels",
  "origin": "prediction",
  "score": 0.419921875
}

Result now:

{
  "from_name": "label_rectangles",
  "score": 0.348876953125,
  "to_name": "image",
  "type": "rectanglelabels",
  "value": {
    "height": 3.5868005738880915,
    "rectanglelabels": [
      "XYZ"
    ],
    "width": 4.48456610366919,
    "x": 3.14502038439138,
    "y": 80.48780487804879
  }
}

Tried And Failed:

hogepodge commented 11 months ago

@AkashDataScience are you using one of the example models provided in this repository? We need more information to be able to understand exactly what issues you're facing, and whether it's an issue the the general backend controller or an issue with your particular backend.

AkashDataScience commented 11 months ago

I am using a custom backend. As of now, I am not sure that prediction API is supposed to return result[N].id e.g. "id": "tofXOU8lTd"