How ultralytics/json2yolo works
Project Type and Purpose
• This is an open-source, command-line Python toolkit for converting COCO-style JSON dataset annotations to the YOLO format. It is not a web service or full-stack app—it’s a lightweight data-conversion utility.
File Structure Analysis
• Top-level scripts:
• general_json2yolo.py – handles generic COCO/JSON → YOLO conversion
• labelbox_json2yolo.py – handles Labelbox-specific JSON → YOLO conversion
• utils.py – shared helper functions (e.g., JSON parsing, coordinate normalization, file I/O)
• requirements.txt – Python dependencies
• Metadata/configuration: .gitignore, LICENSE, README.md
• CI formatting workflow: .github/workflows/format.yml
Key Insights from README
• The core workflow is initiated via a CLI script (convert.py in docs, mapped to the two scripts above), invoked with --json_dir and --save_dir arguments.
• Designed to run on Linux, macOS, and Windows with Python ≥3.8.