JSON2YOLO icon indicating copy to clipboard operation
JSON2YOLO copied to clipboard

can this coco format be converted to YOLO?

Open shiv-acharii opened this issue 4 years ago • 6 comments

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

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

shiv-acharii avatar Jul 15 '21 18:07 shiv-acharii

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

glenn-jocher avatar Jul 16 '21 11:07 glenn-jocher

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

khandriod avatar Mar 14 '22 06:03 khandriod

@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 avatar Dec 19 '22 08:12 OttomanZ

@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).

glenn-jocher avatar Dec 19 '22 09:12 glenn-jocher

@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.

OttomanZ avatar Dec 28 '22 11:12 OttomanZ

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.

glenn-jocher avatar Nov 09 '23 18:11 glenn-jocher