ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.89k stars 16.39k forks source link

Converting yolo segmentation labels to coco json format #10571

Closed Auth0rM0rgan closed 1 year ago

Auth0rM0rgan commented 1 year ago

Search before asking

Question

Hello, Is there any way to convert Yolo segmentation labels to Coco json format?

Thanks!!

Additional

No response

n12iki commented 1 year ago

@Auth0rM0rgan did you find anything by chance?

Rm1n90 commented 1 year ago

@n12iki Save the masks with yolo and then convert the masks to the COCO Json format via this repo : https://github.com/chrise96/image-to-coco-json-converter

ryouchinsa commented 1 year ago

RectLabel is an offline image annotation tool for object detection and segmentation. Although this is not an open source program, with RectLabel, you can import the YOLO segmentation format and export to the COCO segmentation format.

yolo_polygon

github-actions[bot] commented 1 year ago

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

Construct705 commented 1 year ago

Does anybody find a way to convert yolo segementation format to coco json format? I want to import the (auto)labeled yolo files to lableme via json, to manually correct them or is there a tool which can handle yolo segmentation formats directly? Many thanks in advance

github-actions[bot] commented 1 year ago

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

glenn-jocher commented 1 year ago

@Construct705 you can easily convert YOLO segmentation labels to COCO JSON format using the ultralytics/yolov5 repository. The Ultralytics Docs at https://docs.ultralytics.com/yolov5/ provide the necessary instructions and code snippets for this conversion operation.

The YOLOv5 repository provides comprehensive support and tools for manipulating and exporting annotation formats, embracing the versatility of the COCO format. We highly recommend exploring the Ultralytics Docs for any additional guidance.

Thank you for your interest in YOLOv5!

sergiev commented 8 months ago

@glenn-jocher does it? Hadn't managed to find in this repo such tool that can help me convert instance segmentation labels from yolov5/v8 to coco JSON. Could you please name it?

glenn-jocher commented 8 months ago

@sergiev i apologize for the confusion earlier. Currently, the Ultralytics YOLOv5 repository does not directly provide a tool for converting YOLO segmentation labels to COCO JSON format specifically for instance segmentation tasks. My previous response may have been misleading in this regard.

For tasks involving conversion of segmentation labels to COCO format, you might need to explore external tools or scripts that are designed for this purpose. The community often shares utilities and scripts for such tasks, so it might be worth looking into discussions within the YOLOv5 GitHub issues or other forums where developers share their solutions.

Thank you for your understanding, and I appreciate your involvement with YOLOv5.