Skip to content

Add feature which converting json format bbox annotated file to the standard txt format on the ROOT folder #13600

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bstoddgroup
Copy link

@bstoddgroup bstoddgroup commented May 21, 2025

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Adds support for converting custom JSON-annotated datasets to YOLOv5-compatible TXT format, making it easier to use new datasets for training and validation. 📝🔄

📊 Key Changes

  • New Dataset Config: Introduces custom-dataset.yaml for defining a custom dataset with 16 classes (e.g., person, helmet, car, bus).
  • Conversion Script: Adds json2txt.py, a script to convert JSON annotation files into YOLOv5 TXT label format.
  • Command-Line Tool: Allows users to run the conversion with a simple command, specifying the dataset YAML file.

🎯 Purpose & Impact

  • Simplifies Dataset Preparation: Makes it much easier for users to bring their own annotated data (in JSON format) into the YOLOv5 workflow.
  • Broader Dataset Support: Enables training YOLOv5 models on a wider variety of custom datasets without manual label conversion.
  • User-Friendly: Reduces the technical barrier for new users wanting to train on their own data, speeding up experimentation and deployment.

🚀 This update is especially helpful for anyone looking to use YOLOv5 with their own labeled images!

Copy link
Contributor

github-actions bot commented May 21, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I sign the CLA


2 out of 3 committers have signed the CLA.
✅ (UltralyticsAssistant)[https://github.com/UltralyticsAssistant]
✅ (bstoddgroup)[https://github.com/bstoddgroup]
@mangwaier
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@UltralyticsAssistant UltralyticsAssistant added detect Object Detection issues, PR's enhancement New feature or request python Pull requests that update python code labels May 21, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @bstoddgroup, thank you for submitting a ultralytics/yolov5 🚀 pull request! To help ensure a smooth review and integration process, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your feature or fix in your PR description, and link to any relevant issues. Make sure your commit messages are clear and follow the project’s conventions.
  • Synchronize with Source: Ensure your PR is up to date with the ultralytics/yolov5 main branch. If your branch is behind, update it by clicking the 'Update branch' button or running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify that all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please investigate and resolve them.
  • Update Documentation: Update the relevant documentation if your changes introduce new features or modify existing functionality.
  • Add Tests: If applicable, include or update tests to cover your new feature. Confirm that all tests are passing.
  • Sign the CLA: If this is your first Ultralytics PR, please sign our Contributor License Agreement (CLA) by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to only those necessary for your feature. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more information, please see our Contributing Guide. If you have any questions, feel free to comment here.

This is an automated response. An Ultralytics engineer will review your PR and assist you soon. Thank you for contributing to Ultralytics! 📝✨

@bstoddgroup
Copy link
Author

I have read the CLA Document and I sign the CLA

@bstoddgroup
Copy link
Author

bstoddgroup commented May 21, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detect Object Detection issues, PR's enhancement New feature or request python Pull requests that update python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants