ultralytics / JSON2YOLO

Convert JSON annotations into YOLO format.
https://docs.ultralytics.com
GNU Affero General Public License v3.0
811 stars 228 forks source link

I can't properly convert from json to yolo segmentation. #100

Open Kumoni123 opened 1 month ago

Kumoni123 commented 1 month ago

Hi everyone!

I have tagged with Grounding Sam ML Backend in Label Studio: https://labelstud.io/blog/using-text-prompts-for-image-annotation-with-grounding-dino-and-label-studio/ and this is the result of one image.

img1.

I exported it to COCO format I got a json file with rle format and I tried to convert it to yolo using this script: https://github.com/Kumoni123/InspectionVisual/blob/main/src/data/rle_to_yolo.py. I got a .txt file and then I trained the model with this script https://github.com/Kumoni123/InspectionVisual/blob/main/nb/Train_Seg.ipynb but the results of the yolo segmentation model are not very good.

This is the result:

image

I think the error is the way I convert the json file to yolo .txt. Someone could help me to solve it? please.

All the results are in my github: https://github.com/Kumoni123/InspectionVisual

glenn-jocher commented 2 days ago

@Kumoni123 it sounds like the issue might be with the conversion process. I recommend using the JSON2YOLO tool provided by Ultralytics for converting COCO format to YOLO format. Ensure your dataset is correctly formatted before training. You can find more details in the Ultralytics documentation. If the problem persists, try verifying with the latest version of the tool.