verifyannotations


Nameverifyannotations JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/george-mountain/verifyannotations
Summaryverify YOLO data annotations
upload_time2024-03-08 05:18:11
maintainer
docs_urlNone
authorGeorge Mountain
requires_python
licenseMIT
keywords pypi computer vision machine learning data annotations deep learning verifyannotations verify data annotations plot yolo bounding boxes
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# VerifyDataAnnotations

## Overview

VerifyDataAnnotations is a Python package specifically designed to validate and annotate image data with bounding boxes using annotations provided in YOLO format text files. It serves as a tool for verifying the correctness of annotations and ensuring the integrity of datasets intended for use in computer vision tasks, especially those utilizing the YOLO object detection framework.

## Features

- Validates the structure of image and label directories.
- Checks if label files contain valid annotations in YOLO format.
- Ensures that image files have the correct format.
- Annotates images with bounding boxes based on YOLO label annotations.
- Saves annotated images to an output directory.

## Input Parameters

- `label_folder`: Path to the directory containing label files with annotations in YOLO format.
- `raw_image_folder`: Path to the directory containing the raw image files.
- `output_image_folder`: Path to the directory where annotated images will be saved.
- `image_name_list_path`: Path to the text file listing the names of all images in the dataset.
- `class_path`: Path to the text file containing the list of classes or labels used in the dataset.



## Installation

You can install VerifyDataAnnotations via pip:

```bash
pip install verifyannotations
```


## Example

Suppose we have the following directory structure:

```
dataset/
│
├── labels/
│   ├── image1.txt
│   ├── image2.txt
│   └── ...
│
├── images/
│   ├── image1.bmp
│   ├── image2.bmp
│   └── ...
│
├── saved_annotations/
│
├── name_list.txt
└── classes.txt
```

The `labels` directory contains text files with annotation data in YOLO format. The `images` directory contains corresponding image files. `saved_annotations` will store the annotated images.

Using VerifyDataAnnotations:

```python
from verifyannotations import VerifyDataAnnotations

label_folder = "dataset/labels"
raw_image_folder = "dataset/images"
output_image_folder = "dataset/saved_annotations"
image_name_list_path = "dataset/name_list.txt"
class_path = "dataset/classes.txt"

verifier = VerifyDataAnnotations(
    label_folder,
    raw_image_folder,
    output_image_folder,
    image_name_list_path,
    class_path,
)

verifier.verify_annotations()
```

This will validate the annotations, annotate the images with bounding boxes, and save the annotated images to the `saved_annotations` directory.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/george-mountain/verifyannotations",
    "name": "verifyannotations",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pypi,computer vision,machine learning,data annotations,deep learning,verifyannotations,verify data annotations,plot yolo bounding boxes",
    "author": "George Mountain",
    "author_email": "engrmountain@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a6/a8/76efc95b84b7b3bf6b548cb32d0834f5e6cc183b13d8d5c510472ada79e3/verifyannotations-0.1.1.tar.gz",
    "platform": null,
    "description": "\n# VerifyDataAnnotations\n\n## Overview\n\nVerifyDataAnnotations is a Python package specifically designed to validate and annotate image data with bounding boxes using annotations provided in YOLO format text files. It serves as a tool for verifying the correctness of annotations and ensuring the integrity of datasets intended for use in computer vision tasks, especially those utilizing the YOLO object detection framework.\n\n## Features\n\n- Validates the structure of image and label directories.\n- Checks if label files contain valid annotations in YOLO format.\n- Ensures that image files have the correct format.\n- Annotates images with bounding boxes based on YOLO label annotations.\n- Saves annotated images to an output directory.\n\n## Input Parameters\n\n- `label_folder`: Path to the directory containing label files with annotations in YOLO format.\n- `raw_image_folder`: Path to the directory containing the raw image files.\n- `output_image_folder`: Path to the directory where annotated images will be saved.\n- `image_name_list_path`: Path to the text file listing the names of all images in the dataset.\n- `class_path`: Path to the text file containing the list of classes or labels used in the dataset.\n\n\n\n## Installation\n\nYou can install VerifyDataAnnotations via pip:\n\n```bash\npip install verifyannotations\n```\n\n\n## Example\n\nSuppose we have the following directory structure:\n\n```\ndataset/\n\u2502\n\u251c\u2500\u2500 labels/\n\u2502   \u251c\u2500\u2500 image1.txt\n\u2502   \u251c\u2500\u2500 image2.txt\n\u2502   \u2514\u2500\u2500 ...\n\u2502\n\u251c\u2500\u2500 images/\n\u2502   \u251c\u2500\u2500 image1.bmp\n\u2502   \u251c\u2500\u2500 image2.bmp\n\u2502   \u2514\u2500\u2500 ...\n\u2502\n\u251c\u2500\u2500 saved_annotations/\n\u2502\n\u251c\u2500\u2500 name_list.txt\n\u2514\u2500\u2500 classes.txt\n```\n\nThe `labels` directory contains text files with annotation data in YOLO format. The `images` directory contains corresponding image files. `saved_annotations` will store the annotated images.\n\nUsing VerifyDataAnnotations:\n\n```python\nfrom verifyannotations import VerifyDataAnnotations\n\nlabel_folder = \"dataset/labels\"\nraw_image_folder = \"dataset/images\"\noutput_image_folder = \"dataset/saved_annotations\"\nimage_name_list_path = \"dataset/name_list.txt\"\nclass_path = \"dataset/classes.txt\"\n\nverifier = VerifyDataAnnotations(\n    label_folder,\n    raw_image_folder,\n    output_image_folder,\n    image_name_list_path,\n    class_path,\n)\n\nverifier.verify_annotations()\n```\n\nThis will validate the annotations, annotate the images with bounding boxes, and save the annotated images to the `saved_annotations` directory.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "verify YOLO data annotations",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/george-mountain/verifyannotations/issues",
        "Download": "https://github.com/george-mountain/verifyannotations/archive/refs/tags/0.1.1.tar.gz",
        "Homepage": "https://github.com/george-mountain/verifyannotations"
    },
    "split_keywords": [
        "pypi",
        "computer vision",
        "machine learning",
        "data annotations",
        "deep learning",
        "verifyannotations",
        "verify data annotations",
        "plot yolo bounding boxes"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b54d58e6b60a7df3ab8c0a6fde705ebd662ea45aaa8ca92833701cbcd90645b8",
                "md5": "8cee14d4b0f0fa77e7842ee805b00ee2",
                "sha256": "9426d64bc938202d420151bcdb52d6131007263b0b8497af3c6f08bec14ef6f7"
            },
            "downloads": -1,
            "filename": "verifyannotations-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8cee14d4b0f0fa77e7842ee805b00ee2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7100,
            "upload_time": "2024-03-08T05:18:10",
            "upload_time_iso_8601": "2024-03-08T05:18:10.033944Z",
            "url": "https://files.pythonhosted.org/packages/b5/4d/58e6b60a7df3ab8c0a6fde705ebd662ea45aaa8ca92833701cbcd90645b8/verifyannotations-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6a876efc95b84b7b3bf6b548cb32d0834f5e6cc183b13d8d5c510472ada79e3",
                "md5": "ad3a7ee6eb91e038c44adcfe33deca41",
                "sha256": "4cb1b202b052acbef319eaae95c22ce4779d2cd0dcfb0038e362e3b9158671cc"
            },
            "downloads": -1,
            "filename": "verifyannotations-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ad3a7ee6eb91e038c44adcfe33deca41",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6426,
            "upload_time": "2024-03-08T05:18:11",
            "upload_time_iso_8601": "2024-03-08T05:18:11.765107Z",
            "url": "https://files.pythonhosted.org/packages/a6/a8/76efc95b84b7b3bf6b548cb32d0834f5e6cc183b13d8d5c510472ada79e3/verifyannotations-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-08 05:18:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "george-mountain",
    "github_project": "verifyannotations",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "verifyannotations"
}
        
Elapsed time: 0.25259s