label-studio-ml-backend icon indicating copy to clipboard operation
label-studio-ml-backend copied to clipboard

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

Open AkashDataScience opened this issue 1 year ago • 2 comments

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:

  • Restart Label studio and ML backend
  • Use old working program
  • Get prediction of old working projects
  • Create annotations from predictions

AkashDataScience avatar Dec 11 '23 11:12 AkashDataScience

@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.

hogepodge avatar Dec 12 '23 14:12 hogepodge

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"

AkashDataScience avatar Dec 12 '23 15:12 AkashDataScience