JSON2YOLO converter

Hi,
I have a dataset that has been labeled and annotated in COCO JSON format. Every image has its corresponding .JSON file. I want to convert JSON to YOLO format.

I saw the JSON2YOLO converter from GitHub/ultralytics. But I am unable to make use of it. Could some one give me a demo of how to convert the files? I have tried it many times but it only generates an empty new directory.

Thanks.
ultralytics/JSON2YOLO: Convert JSON annotations into YOLO format. (github.com)

1 Like

@khandriod the JSON2YOLO repo converts a few different JSON formats such as COCO and LabelBox, but these in general have one JSON for the entire dataset. You may need to customize to suit your needs.

@khandriod for a list of supported JSON formats (not all JSON files are the same):

While I convert json file to yolo text file, my bounding box width and height dimensions are getting reduced , so I am not able to train my data properly