ultralytics / JSON2YOLO

Convert JSON annotations into YOLO format.

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can this coco format be converted to YOLO?

shivprasad94 opened this issue · comments

WhatsApp Image 2021-07-15 at 11 39 12 PM

Basically its a single JSON file which has all annotation of 2K+ images.

@shivprasad94 COCO and LabelBox JSON formats can be converted to YOLOv5 dataset labels using this repo.

how to use this script? Could you please provide procedure?

@glenn-jocher I wanted to ask if we can use the LabelBox to YOLOv5-seg converter for instance segmentation dataset. My dataset has some fields that include bounding boxes while others include polygons as follows,

image

@OttomanZ interesting. What's the desired behavior in this case? Do you want to treat the boxes as polygons also and attempt to train a segmentation model on the box + segment annotations? This may lead to poor segment results (but good box results).

@OttomanZ interesting. What's the desired behavior in this case? Do you want to treat the boxes as polygons also and attempt to train a segmentation model on the box + segment annotations? This may lead to poor segment results (but good box results).

Hi, I would like to treat the boxes as polygons.

Understood. To treat the boxes as polygons for the segmentation model, you can modify the script to parse both the bounding box and the polygon annotations, and then use the resulting data for training a segmentation model. Just keep in mind that the performance may vary for the segmentation model when using the box annotations as polygons.