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

Make package #26

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

Make package #26

wants to merge 6 commits into from

Conversation

AyushExel
Copy link

@AyushExel AyushExel commented Aug 25, 2022

@glenn-jocher
Added setup.py to convert this into into a package. Can be imported in yolov5 to convert datasets on the fly while training.

Usage

from json2yolo import convert_coco_json
convert_coco_json(...)

Screenshot 2022-08-25 at 3 29 34 PM

Potential improvement:
The function creates a new_dir by default. Instead we can just create the labels/ folder in the coco dataset dir along with the yaml file needed for subsequent loading of data.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

πŸ“Š Key Changes

  • Created a new Python package structure by moving existing scripts under a new json2yolo directory.
  • Removed requirements.txt and added a setup.py script to manage package installation.
  • Refactored utility functions by moving them from individual scripts into json2yolo/utils.py.
  • Removed redundant code related to merging multi-segments within the JSON conversion script.

🎯 Purpose & Impact

  • The change to a package structure πŸ“¦ streamlines the use and distribution of JSON to YOLO conversion tools.
  • By moving dependencies to setup.py πŸ› , installation becomes more conventional and manageable using Python's packaging tools.
  • Centralizing utility functions 🧰 reduces code duplication and eases maintenance, making it easier for developers to use and contribute to the project.

🌟 Summary

Converted JSON2YOLO tools into a maintainable and easily installable Python package 🎁.

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