{"id":28705517,"url":"https://github.com/gabrli/yololint","last_synced_at":"2026-03-12T05:34:01.737Z","repository":{"id":294057493,"uuid":"981656908","full_name":"Gabrli/YoloLint","owner":"Gabrli","description":"YoloLint is a tool for automatic validation of dataset structure, annotation files, and image sizes in YOLO projects. It helps you catch typical errors in directory structure, YAML files, annotation files, and now also ensures all your images have the correct size before you start model training.","archived":false,"fork":false,"pushed_at":"2025-07-22T19:23:30.000Z","size":211,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-29T04:29:35.169Z","etag":null,"topics":["annotation-tool","cli-tool","computer-vision","data-quality","dataset-validation","deep-learning","linter","machine-learning","object-detection","python","training-pipeline","yolo","yolov5","yolov8"],"latest_commit_sha":null,"homepage":"https://yololint.vercel.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gabrli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-11T15:54:10.000Z","updated_at":"2025-07-22T19:23:34.000Z","dependencies_parsed_at":"2025-06-14T14:39:16.917Z","dependency_job_id":"acce1f11-ec88-46df-8da9-cf15980496b9","html_url":"https://github.com/Gabrli/YoloLint","commit_stats":null,"previous_names":["gabrli/yololint"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Gabrli/YoloLint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabrli%2FYoloLint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabrli%2FYoloLint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabrli%2FYoloLint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabrli%2FYoloLint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gabrli","download_url":"https://codeload.github.com/Gabrli/YoloLint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabrli%2FYoloLint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30416310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T04:41:02.746Z","status":"ssl_error","status_checked_at":"2026-03-12T04:40:12.571Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotation-tool","cli-tool","computer-vision","data-quality","dataset-validation","deep-learning","linter","machine-learning","object-detection","python","training-pipeline","yolo","yolov5","yolov8"],"created_at":"2025-06-14T14:39:08.401Z","updated_at":"2026-03-12T05:34:01.715Z","avatar_url":"https://github.com/Gabrli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YOLO Dataset Debugger - (YoloLint)\n\n![Python](https://img.shields.io/badge/Python-3.8%2B-blue?logo=python)\n![License](https://img.shields.io/badge/Apache-License-green)\n![Status](https://img.shields.io/badge/Status-Active-brightgreen)\n![YOLO](https://img.shields.io/badge/YOLO-Dataset-yellow)\n![Linting](https://img.shields.io/badge/Linting-PEP8-blue)\n![Tests](https://img.shields.io/badge/Tests-Passing-success)\n\n---\n\n## 🚀 About\n\n**YoloLint** is a tool for automatic validation of dataset structure, annotation files, and image sizes in YOLO projects. It helps you catch typical errors in directory structure, YAML files, annotation files, and now also ensures all your images have the correct size before you start model training.\n\n---\n\n## 📦 Directory Structure\n\n```\n.\n├── yololint/\n│   ├── clis/\n│   │   ├── structure_validator_cli.py\n│   │   ├── annotation_checker_cli.py\n│   │   └── sizes_checker_cli.py\n│   ├── structure_validator.py\n│   ├── annotation_checker.py\n│   ├── sizes_checker.py\n│   ├── utils/\n│   │   ├── compare_validate.py\n│   │   └── add_file_to_list.py\n│   └── constants/\n│       └── folders.py\n├── tests/\n│   ├── test_structure_validator.py\n│   ├── test_annotation_checker.py\n│   └── utils/\n│       └── prepare_lib_proccess.py\n├── requirements.txt\n├── setup.py\n├── README.md\n```\n\n---\n\n## 🖥️ Available Console Scripts\n\nAfter installing the package, you can use the following commands in your terminal:\n\n### Structure validation\n\n```sh\nyololint-structure-v \u003cpath_to_your_dataset\u003e\n```\n\n### Annotation validation\n\n```sh\nyololint-annotation-v \u003cpath_to_labels_folder\u003e \u003cnumber_of_classes\u003e\n```\n\n### Image size validation and rescaling\n\n```sh\nyololint-sizes-v \u003cpath_to_your_dataset\u003e \u003cwidth\u003e \u003cheight\u003e\n```\n\n---\n\n## 📚 Documentation – How to Use\n\n### Validate Dataset Structure\n\n```python\nfrom yololint.structure_validator import StructureValidator\n\ndataset_path = \"/path/to/your/dataset\"\nchecker = StructureValidator(dataset_path)\nresult = checker.dataset_validation()\nprint(result)\n```\n- **Function:** `StructureValidator.dataset_validation()`\n- **Description:** Checks if the folder structure and `data.yaml` are correct, and if the number of classes and class names match.\n\n---\n\n### Validate YOLO Annotation Files\n\n```python\nfrom yololint.annotation_checker import AnnotationChecker\n\nlabels_path = \"/path/to/your/dataset/labels\"\nclasses_count = 3  # number of classes in your dataset\nchecker = AnnotationChecker(labels_path, classes_count)\nresult = checker.annotation_checker()\nprint(result)\n```\n- **Function:** `AnnotationChecker.annotation_checker()`\n- **Description:** Checks if all `.txt` files have the correct format (5 values per line, valid class_id) and are not empty.\n\n---\n\n### Validate and Rescale Image Sizes\n\n```python\nfrom yololint.sizes_checker import SizesChecker\n\nsizeX = 640  # expected width\nsizeY = 480  # expected height\ndataset_path = \"/path/to/your/dataset\"\n\nchecker = SizesChecker(sizeX, sizeY)\nchecker.check_sizes(dataset_path)\n```\n- **Function:** `SizesChecker.check_sizes(path_to_dataset)`\n- **Description:** Checks if all images in the dataset have the specified size. If an image has a different size, you will be prompted in the terminal to rescale it automatically.\n\n---\n\n## 📝 Example `data.yaml`\n\n```yaml\nnames: ['class1', 'class2', 'class3']\nnc: 3\n```\n\n---\n\n## 👨‍💻 Author\n\n- Gabriel Wiśniewski\n\n---\n\n## 📄 License\n\nProject is licensed under the Apache License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrli%2Fyololint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrli%2Fyololint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrli%2Fyololint/lists"}