bdd100-to-yolo


Namebdd100-to-yolo JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryInvert BDD100 dataset to YOLO dataset
upload_time2024-12-14 03:40:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3
licenseMIT License Copyright (c) 2024 Tom Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords bdd100 to yolo bdd100 yolo dataset dataset invert dataset fix
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BDD100_TO_YOLO
## Introduction
Invert bdd100 dataset to yolo dataset and fix dataset
## Preparation
pip install bdd100-to-yolo
## Example
<pre><code>#import modules
from bdd100_to_yolo import bdd100_to_yolo

#BD100k original image file path, BD100k original label file path and the path saving inverted label files
images_train_path = "bd100/images/train"
images_val_path = "bdd100/images/val"
labels_train_path = "bdd100_labels/det_train.json"
labels_val_path = "bdd100_labels/det_val.json"
labels_train_save_path = "bdd100/labels/train"
labels_val_save_path = "bdd100/labels/val"

'''
It is feasible to delete some lables you do not want or shuffle the list below, 
"pederstrain" corresponds class number 0, "car" corresponds class number 1 and the next follws the same rules as above.
'''
classes = [
    "pedestrian",  
    # "rider",
    "car",
    "truck",
    #"bus",
    # "train",
    "motorcycle",
    "bicycle",
    "traffic light",
    "traffic sign"
]

#Invert DBB100json to YOLO txt
bdd100_to_yolo.dataset_invert(images_train_path, labels_train_path, labels_train_save_path, classes)
bdd100_to_yolo.dataset_invert(images_val_path, labels_val_path, labels_val_save_path, classes)

'''
Some image files may not have corresponding label files, 
so it is necessary to clear the invalid data. 
Warning that you must invert all dbb100 json files to yolo txt file at first and then fixing the dataset. 
BDD100K has 10 000 images so it may take 1 - 3 hours to fix the dataset.
'''
bdd100_to_yolo.dataset_fix(images_train_path, labels_train_save_path)
bdd100_to_yolo.dataset_fix(images_val_path, labels_val_save_path)</code></pre>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bdd100-to-yolo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "Tom <xiaoTomlihail@163.com>",
    "keywords": "BDD100 to YOLO, BDD100, YOLO, dataset, dataset invert, dataset fix",
    "author": null,
    "author_email": "Tom <xiaoTomlihail@163.com>",
    "download_url": "https://files.pythonhosted.org/packages/70/c7/24dfc63c981992ebcea3a0f43ca426683995d71170a4d9a6e02097698441/bdd100_to_yolo-0.0.3.tar.gz",
    "platform": null,
    "description": "# BDD100_TO_YOLO\r\n## Introduction\r\nInvert bdd100 dataset to yolo dataset and fix dataset\r\n## Preparation\r\npip install bdd100-to-yolo\r\n## Example\r\n<pre><code>#import modules\r\nfrom bdd100_to_yolo import bdd100_to_yolo\r\n\r\n#BD100k original image file path, BD100k original label file path and the path saving inverted label files\r\nimages_train_path = \"bd100/images/train\"\r\nimages_val_path = \"bdd100/images/val\"\r\nlabels_train_path = \"bdd100_labels/det_train.json\"\r\nlabels_val_path = \"bdd100_labels/det_val.json\"\r\nlabels_train_save_path = \"bdd100/labels/train\"\r\nlabels_val_save_path = \"bdd100/labels/val\"\r\n\r\n'''\r\nIt is feasible to delete some lables you do not want or shuffle the list below, \r\n\"pederstrain\" corresponds class number 0, \"car\" corresponds class number 1 and the next follws the same rules as above.\r\n'''\r\nclasses = [\r\n    \"pedestrian\",  \r\n    # \"rider\",\r\n    \"car\",\r\n    \"truck\",\r\n    #\"bus\",\r\n    # \"train\",\r\n    \"motorcycle\",\r\n    \"bicycle\",\r\n    \"traffic light\",\r\n    \"traffic sign\"\r\n]\r\n\r\n#Invert DBB100json to YOLO txt\r\nbdd100_to_yolo.dataset_invert(images_train_path, labels_train_path, labels_train_save_path, classes)\r\nbdd100_to_yolo.dataset_invert(images_val_path, labels_val_path, labels_val_save_path, classes)\r\n\r\n'''\r\nSome image files may not have corresponding label files, \r\nso it is necessary to clear the invalid data. \r\nWarning that you must invert all dbb100 json files to yolo txt file at first and then fixing the dataset. \r\nBDD100K has 10 000 images so it may take 1 - 3 hours to fix the dataset.\r\n'''\r\nbdd100_to_yolo.dataset_fix(images_train_path, labels_train_save_path)\r\nbdd100_to_yolo.dataset_fix(images_val_path, labels_val_save_path)</code></pre>\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Tom  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Invert BDD100 dataset to YOLO dataset",
    "version": "0.0.3",
    "project_urls": {
        "Repository": "https://github.com/littlTom/bdd100_to_yolo.git"
    },
    "split_keywords": [
        "bdd100 to yolo",
        " bdd100",
        " yolo",
        " dataset",
        " dataset invert",
        " dataset fix"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df512b8d925d2aac818be3d765902ea3bc45a670eb628eb8030925b086e1707b",
                "md5": "caad5b7d736041cc728c4d710b06723a",
                "sha256": "3608dd8a4741f0b58b00adc40653255eaed2c9ecf5a9651d81f5afd871b5fa01"
            },
            "downloads": -1,
            "filename": "bdd100_to_yolo-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "caad5b7d736041cc728c4d710b06723a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 4584,
            "upload_time": "2024-12-14T03:40:22",
            "upload_time_iso_8601": "2024-12-14T03:40:22.823167Z",
            "url": "https://files.pythonhosted.org/packages/df/51/2b8d925d2aac818be3d765902ea3bc45a670eb628eb8030925b086e1707b/bdd100_to_yolo-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70c724dfc63c981992ebcea3a0f43ca426683995d71170a4d9a6e02097698441",
                "md5": "2d819e88196d8945f05bb2496da38dba",
                "sha256": "1e44e9d4246f27ccdd7a18c7330973635d6615dbff2560bb862ca64be6402230"
            },
            "downloads": -1,
            "filename": "bdd100_to_yolo-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "2d819e88196d8945f05bb2496da38dba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 3749,
            "upload_time": "2024-12-14T03:40:25",
            "upload_time_iso_8601": "2024-12-14T03:40:25.186209Z",
            "url": "https://files.pythonhosted.org/packages/70/c7/24dfc63c981992ebcea3a0f43ca426683995d71170a4d9a6e02097698441/bdd100_to_yolo-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-14 03:40:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "littlTom",
    "github_project": "bdd100_to_yolo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bdd100-to-yolo"
}
        
Elapsed time: 0.40005s