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

The rectangles of predictions shown in web are wrong, but the predictions are correct for the input image

Open ErnestinaQiu opened this issue 2 years ago • 3 comments

The text area recognized by the OCR ml backend written by myself is misplaced on the web page, but the recognition result of the text content is correct. I use def convert_to_ls in https://labelstud.io/guide/predictions.html#Units-of-image-annotations to convert the unit.

ErnestinaQiu avatar Jul 04 '23 07:07 ErnestinaQiu

issues_ml_backend

ErnestinaQiu avatar Jul 04 '23 07:07 ErnestinaQiu

I had the same issue until I realized the coordinate system of my model was different. It seems that label-studio uses X and Y values as the position of the top-left corner of the bounding box.

So, let's say you want to place a bounding box occupying the entire image. Then the coordinates would be:

  • x = 0
  • y = 0
  • width = 100
  • height = 100

At least it worked when I converted it to work that way.

matharano avatar Jul 05 '23 20:07 matharano

Thanks for your sharing.
However, I tried another way to achieve it that I figured out the transformation functions between the wrong rectangle data I got from def convert_to_ls and the right data corrected mannually. It may sound a little strange and troublesome, but it works well.

ErnestinaQiu avatar Jul 06 '23 05:07 ErnestinaQiu