ultralytics / JSON2YOLO

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

can this coco format be converted to YOLO? #19

Open shivprasad94 opened 2 years ago

shivprasad94 commented 2 years ago

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

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

glenn-jocher commented 2 years ago

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

khandriod commented 2 years ago

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

OttomanZ commented 1 year ago

@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

glenn-jocher commented 1 year ago

@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 commented 1 year ago

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

glenn-jocher commented 8 months ago

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.