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

Generate yaml including class id and name #70

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

Conversation

darouwan
Copy link

@darouwan darouwan commented Dec 25, 2023

Auto generate the yaml file including the class id and class name.
The train and val folders are set to :

train: images/train
val: images/val

by default.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

πŸ“Š Key Changes

  • YAML library import added to the script (import yaml).
  • The script now generates a YAML file containing class IDs and names related to COCO datasets.
  • Categories dictionary creation within the COCO JSON conversion process.
  • The category ID is decremented by one to match array index starting at zero.
  • A dictionary with class names and folder paths for training and validation dataset locations is now outputted as a YAML file, aligning with the expected format for YOLO training.

🎯 Purpose & Impact

  • The update makes it simpler for users to set up datasets for training with the YOLO algorithm by automatically generating a necessary .yaml file.
  • It bridges a gap between COCO JSON format and what's required for YOLO training configurations, enhancing usability and reducing manual effort.

🌟 Summary

πŸš€ The PR extends the JSON to YOLO conversion utility by automatically generating a YAML configuration file with class names and data paths for more seamless YOLO model training setups.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

πŸ“Š Key Changes

  • YAML file generation capability added to include class ids and names πŸ”§.
  • Specific targeting of JSON files renamed to include "coco" in the file-finding pattern 🎯.
  • Creation of a category dictionary mapping class ids to their names πŸ“š.

🎯 Purpose & Impact

The update allows users to generate a corresponding YAML file alongside YOLO-formatted label files, including the class ids and names. This encompasses a more straightforward setup for YOLO training, as the YAML format is often used in training configurations πŸš€. By filtering JSON files to those containing "coco" in their names, the script focuses more on the specific files commonly used in the COCO dataset ecosystem, making the conversion process more efficient 🌐.

🌟 Summary

Enhance JSON-to-YOLO conversion by creating a YAML config with class identification for a smoother training prep in YOLO-based ML projects ✨.

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.

2 participants