ultralytics / JSON2YOLO

Convert JSON annotations into YOLO format.

Home Page:https://docs.ultralytics.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Converting fsco-dataset .json format into yolov8 acceptance format

shivakarnati opened this issue · comments

Hi All!

I would like to convert below .json annotated file into yolov8 acceptance format, can somebody help me out ?

{ "description": "", "tags": [ { "id": 118615272, "tagId": 30143178, "name": "train", "value": null, "labelerLogin": "fsocov2", "createdAt": "2020-08-11T08:43:40.624Z", "updatedAt": "2020-08-11T08:43:40.624Z" } ], "size": { "height": 920, "width": 2872 }, "objects": [ { "id": 889978312, "classId": 9993511, "description": "", "geometryType": "rectangle", "labelerLogin": "fsocov2", "createdAt": "2020-08-11T08:17:13.366Z", "updatedAt": "2020-08-11T08:17:13.366Z", "tags": [], "classTitle": "blue_cone", "points": { "exterior": [ [ 2377, 198 ], [ 2398, 224 ] ], "interior": [] } }, { "id": 889978311, "classId": 9993511, "description": "", "geometryType": "rectangle", "labelerLogin": "fsocov2", "createdAt": "2020-08-11T08:17:13.366Z", "updatedAt": "2020-08-11T08:17:13.366Z", "tags": [], "classTitle": "blue_cone", "points": { "exterior": [ [ 2419, 189 ], [ 2436, 210 ] ], "interior": [] } }, { "id": 889978310, "classId": 9993511, "description": "", "geometryType": "rectangle", "labelerLogin": "fsocov2", "createdAt": "2020-08-11T08:17:13.366Z", "updatedAt": "2020-08-11T08:17:13.366Z", "tags": [], "classTitle": "blue_cone", "points": { "exterior": [ [ 2316, 212 ], [ 2345, 246 ] ], "interior": [] } },

And I need in <class_id> <x_center> <y_center> <width> <height>

@shivakarnati you can convert the provided JSON annotations into YOLOv5 acceptance format using scripts or tools to parse and transform the data. This often involves mapping class titles to class IDs and converting bounding box coordinates. Check out the Ultralytics Docs for more details on data formatting. Good luck! 🚀