Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the COCO RLE format to YOLOv5/v8 segmentation format. (Sourcery refactored) #62

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Nov 29, 2023

Pull Request #61 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/ultralytics/JSON2YOLO pull/61/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

πŸ“Š Key Changes

  • Added the ability to convert COCO RLE (Run Length Encoding) formatted annotations to YOLOv5/v8 segmentation format.
  • Implemented functions to support keypoints in annotations, including flip indices and merging multiple contours.
  • Introduced utility functions for various transformations like converting masks to polygons, RLE to polygon, and more.

🎯 Purpose & Impact

The purpose of these changes is to enhance the JSON2YOLO conversion tool to support more complex annotation formats used in computer vision datasets, especially keypoints and segmentation masks. 🌐 This will allow developers and researchers who use the YOLO format for object detection and instance segmentation tasks to work with a broader range of datasets that may contain different types of annotations. For non-experts, these features make it easier to convert datasets without needing an in-depth understanding of annotation formats, potentially accelerating their AI/ML projects.

🌟 Summary

Now you can convert COCO dataset annotations with keypoints and segmentation to the YOLO format in a snap! πŸŽ‰ This update makes your data transformation tasks much simpler and supports more types of computer vision training escapades. πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant