Open saifwael8 opened 3 months ago
I see that your code tries to reuse some parts of bbox import, but it's wrong. There shouldn't be any width/height/centers in polygon lines. You can check how it's done in COCO import.
Also it would be great if you could make a PR in label-studio-sdk with YOLO and the polygon import. This code should be placed here: https://github.com/HumanSignal/label-studio-sdk/blob/master/src/label_studio_sdk/converter/imports/yolo.py.
Then we will be able to review your code and point you to potential problems.
Describe the bug So I was trying to import data in Yolov8 text format to label studio. There was a tutorial that I followed explaining importing detection yolov8 format by converting it to label studio JSON format using LabelStudio-converter. That method worked fine when importing detection data containing the 4 coordinates. However, when I tried to import segmentation data containing multiple coordinates of the segmentation polygon the converter did not work. Thus, I wrote a script to convert the yolov8 seg format to label studio JSON format and the images were uploaded along with the coordinates in the columns, but for some reason the segmentations done would not appear on the image at all. I think it is a problem with the generated JSON format from my script so I would really appreciate the help from someone of the LS team. Attached below is snippets from LS, my python conversion script and an example of the generated JSON format.
To Reproduce Steps to reproduce the behavior:
Expected behavior The annotations should be present
Screenshots
Environment (please complete the following information):
Additional context output_new.json