Labelme2YOLO
Labelme2YOLO is a powerful tool for converting LabelMe's JSON format to YOLOv5 dataset format. This tool can also be used for YOLOv5/YOLOv8 segmentation datasets, if you have already made your segmentation dataset with LabelMe, it is easy to use this tool to help convert to YOLO format dataset.
New Features
- export data as yolo polygon annotation (for YOLOv5 & YOLOV8 segmentation)
- Now you can choose the output format of the label text. The two available alternatives are
polygonand bounding box (bbox).
Installation
pip install labelme2yolo
Arguments
--json_dir LabelMe JSON files folder path.
--val_size (Optional) Validation dataset size, for example 0.2 means 20% for validation.
--test_size (Optional) Test dataset size, for example 0.1 means 10% for Test.
--json_name (Optional) Convert single LabelMe JSON file.
--output_format (Optional) The output format of label.
--label_list (Optional) The pre-assigned category labels.
How to Use
1. Converting JSON files and splitting training, validation datasets
You may need to place all LabelMe JSON files under labelme_json_dir and then run the following command:
labelme2yolo --json_dir /path/to/labelme_json_dir/
This tool will generate dataset labels and images with YOLO format in different folders, such as
/path/to/labelme_json_dir/YOLODataset/labels/train/
/path/to/labelme_json_dir/YOLODataset/labels/val/
/path/to/labelme_json_dir/YOLODataset/images/train/
/path/to/labelme_json_dir/YOLODataset/images/val/
/path/to/labelme_json_dir/YOLODataset/dataset.yaml
2. Converting JSON files and splitting training, validation, and test datasets with --val_size and --test_size
You may need to place all LabelMe JSON files under labelme_json_dir and then run the following command:
labelme2yolo --json_dir /path/to/labelme_json_dir/ --val_size 0.15 --test_size 0.15
This tool will generate dataset labels and images with YOLO format in different folders, such as
/path/to/labelme_json_dir/YOLODataset/labels/train/
/path/to/labelme_json_dir/YOLODataset/labels/test/
/path/to/labelme_json_dir/YOLODataset/labels/val/
/path/to/labelme_json_dir/YOLODataset/images/train/
/path/to/labelme_json_dir/YOLODataset/images/test/
/path/to/labelme_json_dir/YOLODataset/images/val/
/path/to/labelme_json_dir/YOLODataset/dataset.yaml
How to build package/wheel
pip install maturin
maturin develop
License
labelme2yolo is distributed under the terms of the MIT license.
Metadata
Release files for labelme2yolo 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| labelme2yolo-0.2.0.tar.gz | 17.9 kB | Details |
Built distributions (wheels)
Total release size: 12.3 MB
Release files / labelme2yolo-0.2.0.tar.gz
| Download URL | labelme2yolo-0.2.0.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91780f643da8eca8d6cf9b1649541dbcb3d3b0892ecd612f75745ea0ba4e762e
|
|
BLAKE2b-256 checksum How to use checksums |
357f489d637896e95eb8330fb160d75c245c331e8a1e71fb76dea73de6498263
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-win_amd64.whl
| Download URL | labelme2yolo-0.2.0-py3-none-win_amd64.whl |
|---|---|
| Size | 676.9 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f70c31a7d4cbc5b104d20e44aca610fd73af1b76aab3c40af6820480c8c135cd
|
|
BLAKE2b-256 checksum How to use checksums |
ad5551862703d8b55a67ef960a9995c9bdb231f25f6fe5eb2957e56a3534ac05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-win32.whl
| Download URL | labelme2yolo-0.2.0-py3-none-win32.whl |
|---|---|
| Size | 638.6 kB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
6cdc3e81631cb83f208cca55aaa4b9c70bac690c2c83645ce61954ebe80406a1
|
|
BLAKE2b-256 checksum How to use checksums |
a7cb4909e566e62c931a01fe755151f120a678df2efb97a6fd8c3fe9c966872f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | labelme2yolo-0.2.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 954.2 kB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
2fc395abeb49c10754eadd0a9dd70d9790a32046951cf1091993f7a301686913
|
|
BLAKE2b-256 checksum How to use checksums |
42fdb247fd73bd59750054b7d459c7c5cb11d2c187aa775c33898374f8f79a9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-musllinux_1_2_i686.whl
| Download URL | labelme2yolo-0.2.0-py3-none-musllinux_1_2_i686.whl |
|---|---|
| Size | 944.6 kB |
| Tags | Linux musl 1.2+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
a1daf44853ce82543049944b329338465dfe356061669dbe877b052a002bf33b
|
|
BLAKE2b-256 checksum How to use checksums |
5867ed8b81fed6b29a91cc2f35121057976e3bab7d846894dddfe4eb9aa8b552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-musllinux_1_2_armv7l.whl
| Download URL | labelme2yolo-0.2.0-py3-none-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 889.1 kB |
| Tags | Linux musl 1.2+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
2eb065d07f29c051635e08340ca7f8fd6834bc4b602f19c69e636a7470470e15
|
|
BLAKE2b-256 checksum How to use checksums |
6804c7d4f3c85bbf0da41b42f41647b3f91e3189d8847ca429e6e15a1a70acc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | labelme2yolo-0.2.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 915.4 kB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
0d8f2b3c03d2d340e27254fad2231c2fff1f1d624c67d165076fffc86750bcb1
|
|
BLAKE2b-256 checksum How to use checksums |
21ab8d6563825e59cc04a396b86a936d3f51ad3cedd905812e3c744e2beff9a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | labelme2yolo-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 900.3 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7d748854049945a15c572d4ffa0e268763739abea8ee46ea99422f0d9b6937b0
|
|
BLAKE2b-256 checksum How to use checksums |
bed136dfe7c0214e66c7a637e9eeaabef8521d76eebb700bd890ccb122b06d84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
| Download URL | labelme2yolo-0.2.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Linux glibc 2.17+ IBM System/390x Python 3 |
|
SHA-256 checksum How to use checksums |
dc4d00e621ed762849456e5226696f4469d83495a0e0da2d5756fc4c65dd9c85
|
|
BLAKE2b-256 checksum How to use checksums |
75b600fcfcdd517ae4c1d47cc9d7de70130b070469aef959caa13bcdf342ef51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | labelme2yolo-0.2.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 972.3 kB |
| Tags | Linux glibc 2.17+ PowerPC 64-le Python 3 |
|
SHA-256 checksum How to use checksums |
6adac9ade152834f40b0f6e03eb1d1aa4630185aa7c4e930861c8846c9c7222e
|
|
BLAKE2b-256 checksum How to use checksums |
7a48ee20a5a1824c64c6ac2ad96ae91eac64d77f15ee0ef4e6399b36b2af9c1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | labelme2yolo-0.2.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 946.5 kB |
| Tags | Linux glibc 2.17+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
e2bcbaab31d354e02e28af2424cd0a8bc46523835b26c87c44c58a0d28e9581a
|
|
BLAKE2b-256 checksum How to use checksums |
c987378c779b6f50466a4d108c5f20d3e21cf20d3bae79e9f304217996e7e954
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | labelme2yolo-0.2.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 865.8 kB |
| Tags | Linux glibc 2.17+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
a1f134270ea1c23aeb9ac09920f896ee2d77ee503a11439a9fed005351b5e9b9
|
|
BLAKE2b-256 checksum How to use checksums |
6568b6d4b3976fb447d69624662684c2ae57fa74697007eb96ab809336af97b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | labelme2yolo-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 890.3 kB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
51e3ccd1c190f4fdf373b66419586ba10686847c157e19f5a2de020e0d46a90f
|
|
BLAKE2b-256 checksum How to use checksums |
ed5906ac531f3fe1c67ff19818ed07308d26e14109e5de689051fba348f85faf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-macosx_11_0_arm64.whl
| Download URL | labelme2yolo-0.2.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 800.8 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
73d39d2a0ef3b27d1a7148a6861a30b07bb4cfb5b68f2ed37998a830af50dd93
|
|
BLAKE2b-256 checksum How to use checksums |
bcd4b297528a85ebe24a8b853abfbe7eb85a7b56fd84c2fdc036ca75e208e6ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / labelme2yolo-0.2.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | labelme2yolo-0.2.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 816.9 kB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c491b90c62ab2e0dde30bea3137212229d60be657aebe99e36c095fad848fc2c
|
|
BLAKE2b-256 checksum How to use checksums |
173d65c70f14171361a31d79c693020d9efab335b8289e3b35455b461d463033
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|