labelme-to-yolo


Namelabelme-to-yolo JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/Tlaloc-Es/labelme-to-yolo
SummaryA tool to convert LabelMe dataset annotations into YOLO format for instance segmentation.
upload_time2024-12-29 19:23:47
maintainerNone
docs_urlNone
authorTlaloc-Es
requires_python<4.0,>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LabelMe to Yolo

<div align="center">

[![Downloads](https://static.pepy.tech/personalized-badge/labelme-to-yolo?period=month&units=international_system&left_color=grey&right_color=blue&left_text=PyPi%20Downloads)](https://pepy.tech/project/labelme-to-yolo)
[![Stars](https://img.shields.io/github/stars/Tlaloc-Es/labelme-to-yolo?color=yellow&style=flat)](https://github.com/Tlaloc-Es/labelme-to-yolo/stargazers)

</div>

Convert [LabelMe](https://github.com/wkentaro/labelme) format into [YoloV7](https://github.com/WongKinYiu/yolov7) format for instance segmentation.

## Installation [![PyPI](https://img.shields.io/pypi/v/labelme2yolo.svg)](https://pypi.org/project/labelme2yolo/)

You can install `labelme2yolo` from [Pypi](https://pypi.org/project/labelme-to-yolo/). It's going to install the library itself and its prerequisites as well.

```bash
pip install labelme2yolo
```

You can install `labelme2yolo` from its source code.

```bash
git clone https://github.com/Tlaloc-Es/labelme-to-yolo.git
cd labelme2yolo
pip install -e .
```

## Usage

First of all, make your dataset with LabelMe, after that call to the following command

`labelme2yolo --source-path /labelme/dataset --output-path /another/path`

The arguments are:

- `--source-path`: That indicates the path where are the json output of LabelMe and their images, both will have been in the same folder
- `--output-path`: The path where you will save the converted files and a copy of the images following the yolov7 folder estructure

### Expected output

If you execute the following command:

`labelme2yolo --source-path /labelme/dataset --output-path /another/datasets`

You will get something like this

```bash
datasets
├── images
│   ├── train
│   │   ├── img_1.jpg
│   │   ├── img_2.jpg
│   │   ├── img_3.jpg
│   │   ├── img_4.jpg
│   │   └── img_5.jpg
│   └── val
│       ├── img_6.jpg
│       └── img_7.jpg
├── labels
│   ├── train
│   │   ├── img_1.txt
│   │   ├── img_2.txt
│   │   ├── img_3.txt
│   │   ├── img_4.txt
│   │   └── img_5.txt
│   └── val
│       ├── img_6.txt
│       └── img_7.txt
├── labels.txt
├── test.txt
└── train.txt
```

## Donation

If you want to contribute you can make a donation at https://www.buymeacoffee.com/tlaloc, thanks in advance

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Tlaloc-Es/labelme-to-yolo",
    "name": "labelme-to-yolo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Tlaloc-Es",
    "author_email": "dev@tlaloc-es.com",
    "download_url": "https://files.pythonhosted.org/packages/67/c4/0c74ecf48344700078ac0420ab0a988ace85c665122afdd8c5ad66ed8021/labelme_to_yolo-0.2.0.tar.gz",
    "platform": null,
    "description": "# LabelMe to Yolo\n\n<div align=\"center\">\n\n[![Downloads](https://static.pepy.tech/personalized-badge/labelme-to-yolo?period=month&units=international_system&left_color=grey&right_color=blue&left_text=PyPi%20Downloads)](https://pepy.tech/project/labelme-to-yolo)\n[![Stars](https://img.shields.io/github/stars/Tlaloc-Es/labelme-to-yolo?color=yellow&style=flat)](https://github.com/Tlaloc-Es/labelme-to-yolo/stargazers)\n\n</div>\n\nConvert [LabelMe](https://github.com/wkentaro/labelme) format into [YoloV7](https://github.com/WongKinYiu/yolov7) format for instance segmentation.\n\n## Installation [![PyPI](https://img.shields.io/pypi/v/labelme2yolo.svg)](https://pypi.org/project/labelme2yolo/)\n\nYou can install `labelme2yolo` from [Pypi](https://pypi.org/project/labelme-to-yolo/). It's going to install the library itself and its prerequisites as well.\n\n```bash\npip install labelme2yolo\n```\n\nYou can install `labelme2yolo` from its source code.\n\n```bash\ngit clone https://github.com/Tlaloc-Es/labelme-to-yolo.git\ncd labelme2yolo\npip install -e .\n```\n\n## Usage\n\nFirst of all, make your dataset with LabelMe, after that call to the following command\n\n`labelme2yolo --source-path /labelme/dataset --output-path /another/path`\n\nThe arguments are:\n\n- `--source-path`: That indicates the path where are the json output of LabelMe and their images, both will have been in the same folder\n- `--output-path`: The path where you will save the converted files and a copy of the images following the yolov7 folder estructure\n\n### Expected output\n\nIf you execute the following command:\n\n`labelme2yolo --source-path /labelme/dataset --output-path /another/datasets`\n\nYou will get something like this\n\n```bash\ndatasets\n\u251c\u2500\u2500 images\n\u2502   \u251c\u2500\u2500 train\n\u2502   \u2502   \u251c\u2500\u2500 img_1.jpg\n\u2502   \u2502   \u251c\u2500\u2500 img_2.jpg\n\u2502   \u2502   \u251c\u2500\u2500 img_3.jpg\n\u2502   \u2502   \u251c\u2500\u2500 img_4.jpg\n\u2502   \u2502   \u2514\u2500\u2500 img_5.jpg\n\u2502   \u2514\u2500\u2500 val\n\u2502       \u251c\u2500\u2500 img_6.jpg\n\u2502       \u2514\u2500\u2500 img_7.jpg\n\u251c\u2500\u2500 labels\n\u2502   \u251c\u2500\u2500 train\n\u2502   \u2502   \u251c\u2500\u2500 img_1.txt\n\u2502   \u2502   \u251c\u2500\u2500 img_2.txt\n\u2502   \u2502   \u251c\u2500\u2500 img_3.txt\n\u2502   \u2502   \u251c\u2500\u2500 img_4.txt\n\u2502   \u2502   \u2514\u2500\u2500 img_5.txt\n\u2502   \u2514\u2500\u2500 val\n\u2502       \u251c\u2500\u2500 img_6.txt\n\u2502       \u2514\u2500\u2500 img_7.txt\n\u251c\u2500\u2500 labels.txt\n\u251c\u2500\u2500 test.txt\n\u2514\u2500\u2500 train.txt\n```\n\n## Donation\n\nIf you want to contribute you can make a donation at https://www.buymeacoffee.com/tlaloc, thanks in advance\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool to convert LabelMe dataset annotations into YOLO format for instance segmentation.",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/Tlaloc-Es/labelme-to-yolo",
        "Repository": "https://github.com/Tlaloc-Es/labelme-to-yolo"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00263b14157e760b7128a67680c7686862ee0772891d4f6220be127529b45515",
                "md5": "d779e096ea653daf221cf332214a614b",
                "sha256": "5e2913bba03b496fedaf614c1c74971061bd603edee7f529abdb1a102d6ab936"
            },
            "downloads": -1,
            "filename": "labelme_to_yolo-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d779e096ea653daf221cf332214a614b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 5495,
            "upload_time": "2024-12-29T19:23:45",
            "upload_time_iso_8601": "2024-12-29T19:23:45.750248Z",
            "url": "https://files.pythonhosted.org/packages/00/26/3b14157e760b7128a67680c7686862ee0772891d4f6220be127529b45515/labelme_to_yolo-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "67c40c74ecf48344700078ac0420ab0a988ace85c665122afdd8c5ad66ed8021",
                "md5": "6a0ccc25a52ff660ff8026ef379bbb1b",
                "sha256": "578c656663a6499c945c198eda4595106e65642ca179456bdfdd8779a2e4181f"
            },
            "downloads": -1,
            "filename": "labelme_to_yolo-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6a0ccc25a52ff660ff8026ef379bbb1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 4585,
            "upload_time": "2024-12-29T19:23:47",
            "upload_time_iso_8601": "2024-12-29T19:23:47.756562Z",
            "url": "https://files.pythonhosted.org/packages/67/c4/0c74ecf48344700078ac0420ab0a988ace85c665122afdd8c5ad66ed8021/labelme_to_yolo-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-29 19:23:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Tlaloc-Es",
    "github_project": "labelme-to-yolo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "labelme-to-yolo"
}
        
Elapsed time: 0.45443s