Skip to main content

Labelme2YOLO

PyPI - Version PyPI - Downloads PYPI - Downloads

Labelme2YOLO efficiently converts LabelMe's JSON format to the YOLOv5 dataset format. It also supports YOLOv5/YOLOv8 segmentation datasets, making it simple to convert existing LabelMe segmentation datasets to YOLO format.

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 polygon and bounding box(bbox).

Performance

Labelme2YOLO is implemented in Rust, which makes it significantly faster than equivalent Python implementations. In fact, it can be up to 100 times faster, allowing you to process large datasets more efficiently.

Installation

pip install labelme2yolo

Arguments

[LABEL_LIST]... Comma-separated list of labels in the dataset.

Options

-d, --json_dir <JSON_DIR> Directory containing LabelMe JSON files.

--val_size <VAL_SIZE> Proportion of the dataset to use for validation (between 0.0 and 1.0) [default: 0.2].

--test_size <TEST_SIZE> Proportion of the dataset to use for testing (between 0.0 and 1.0) [default: 0].

--output_format <OUTPUT_FORMAT> Output format for YOLO annotations: 'bbox' or 'polygon' [default: bbox] [aliases: format] [possible values: polygon, bbox].

--seed Seed for random shuffling [default: 42].

-h, --help Print help.

-V, --version Print version.

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

Metadata

Release files for labelme2yolo 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for labelme2yolo 0.2.4
File Size Uploaded Provenance Actions
labelme2yolo-0.2.4.tar.gz 14.2 kB Without provenance Details for labelme2yolo-0.2.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for labelme2yolo 0.2.4
File Actions
labelme2yolo-0.2.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for labelme2yolo-0.2.4-py3-none-win_amd64.whl
labelme2yolo-0.2.4-py3-none-win32.whl Python 3 none Windows x86-32 Details for labelme2yolo-0.2.4-py3-none-win32.whl
labelme2yolo-0.2.4-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for labelme2yolo-0.2.4-py3-none-musllinux_1_2_x86_64.whl
labelme2yolo-0.2.4-py3-none-musllinux_1_2_i686.whl Python 3 none Linux musl 1.2+ x86-32 Details for labelme2yolo-0.2.4-py3-none-musllinux_1_2_i686.whl
labelme2yolo-0.2.4-py3-none-musllinux_1_2_armv7l.whl Python 3 none Linux musl 1.2+ ARMv7l Details for labelme2yolo-0.2.4-py3-none-musllinux_1_2_armv7l.whl
labelme2yolo-0.2.4-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for labelme2yolo-0.2.4-py3-none-musllinux_1_2_aarch64.whl
labelme2yolo-0.2.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for labelme2yolo-0.2.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
labelme2yolo-0.2.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl Python 3 none Linux glibc 2.17+ IBM System/390x Details for labelme2yolo-0.2.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
labelme2yolo-0.2.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl Python 3 none Linux glibc 2.17+ PowerPC 64-le Details for labelme2yolo-0.2.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
labelme2yolo-0.2.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details for labelme2yolo-0.2.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
labelme2yolo-0.2.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details for labelme2yolo-0.2.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
labelme2yolo-0.2.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for labelme2yolo-0.2.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
labelme2yolo-0.2.4-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for labelme2yolo-0.2.4-py3-none-macosx_11_0_arm64.whl
labelme2yolo-0.2.4-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for labelme2yolo-0.2.4-py3-none-macosx_10_12_x86_64.whl

Total release size: 18.5 MB

Release files / labelme2yolo-0.2.4.tar.gz

Download URL labelme2yolo-0.2.4.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
782cac00a4d12974ac1538e37fc1bd9d3e87f1d5b03657176e928febd51bdd48
BLAKE2b-256 checksum
How to use checksums
07db2fae02a069434d4b6c098232b6b89cd0b52bd1b6a36bf005100705222c6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-win_amd64.whl

Download URL labelme2yolo-0.2.4-py3-none-win_amd64.whl
Size 1.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2d7633a55c315d34d015d130d00dae079d220f8272f52783a93c3463910e7351
BLAKE2b-256 checksum
How to use checksums
b5ffb7d419ee568e2ca679041e2d35f757edd428b46f2aeb7e966896da968253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-win32.whl

Download URL labelme2yolo-0.2.4-py3-none-win32.whl
Size 970.2 kB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
1cc71c7dab89e8376136f2287b0fe95788ae29d84b2ce9d8a1e8b6c618e40a5c
BLAKE2b-256 checksum
How to use checksums
0051176830fe70e37f15ea03dd1c8821605ed699b81b9793f76c2b642ef7a853
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-musllinux_1_2_x86_64.whl

Download URL labelme2yolo-0.2.4-py3-none-musllinux_1_2_x86_64.whl
Size 1.4 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
81192a56b4f062528e8c8dbd8ea2e8efd602ed383ef684b265c5827877e0d9bc
BLAKE2b-256 checksum
How to use checksums
1c7f12c276b0c2453aa6674cfdf70442660a0f36ed746de2d873badd6438584b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-musllinux_1_2_i686.whl

Download URL labelme2yolo-0.2.4-py3-none-musllinux_1_2_i686.whl
Size 1.4 MB
Tags Linux musl 1.2+ x86-32 Python 3
SHA-256 checksum
How to use checksums
2a316d969ce2e9694759189f4ddc09503573dc6bce156b56c86ea072ad7674b5
BLAKE2b-256 checksum
How to use checksums
0035b602eebf1636b828e55d9db1300267bb53044936bef2ac5029d7beb068c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-musllinux_1_2_armv7l.whl

Download URL labelme2yolo-0.2.4-py3-none-musllinux_1_2_armv7l.whl
Size 1.3 MB
Tags Linux musl 1.2+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
cad80bcebb66e510511cd691612541ffa8fdc76addd634f744da437548bad548
BLAKE2b-256 checksum
How to use checksums
5186e57f3418eb70cc5265819046838d0a7c0f603c08d87f26c9888c47f3523c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-musllinux_1_2_aarch64.whl

Download URL labelme2yolo-0.2.4-py3-none-musllinux_1_2_aarch64.whl
Size 1.4 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
9ba642dc2808d260cc76a30cb055a2ac19b4221478257a6d7d2362cbbd923223
BLAKE2b-256 checksum
How to use checksums
0c0a949257ca5f4ea25e8b7fa21bc5a80cf595c023df6429492e870c41eb6c57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL labelme2yolo-0.2.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.4 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
4d2fc85d13b246c4adf7fdec7e68d31916d078575200070975fc611cc26ba9fd
BLAKE2b-256 checksum
How to use checksums
d417d2559c7c488cddee571e034eccc4b1a8ca5e86a9702b596ab385e4a052f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL labelme2yolo-0.2.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 1.5 MB
Tags Linux glibc 2.17+ IBM System/390x Python 3
SHA-256 checksum
How to use checksums
73c04ed5db2b878a04d1e743cd251c29fd11467dd8d83174f6fa142ccaa4c467
BLAKE2b-256 checksum
How to use checksums
e3cea28e806917190b5d7397162359efdd5b0181ab11ef18f0859ae7dc1f3dd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL labelme2yolo-0.2.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 1.4 MB
Tags Linux glibc 2.17+ PowerPC 64-le Python 3
SHA-256 checksum
How to use checksums
91589bd68235b9c68361fc531834554c670ba0c694445fe226cf0d9bb1437720
BLAKE2b-256 checksum
How to use checksums
44e2ff95628c0c0e295ffed1947fdd3c3206d845e2c96d78d46e30aa743ae276
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL labelme2yolo-0.2.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Size 1.4 MB
Tags Linux glibc 2.17+ x86-32 Python 3
SHA-256 checksum
How to use checksums
d2bd5ad9831f14e3af26e69a843312203add00c83152a227a22a18ac14381095
BLAKE2b-256 checksum
How to use checksums
a25387c012b69b39c7a5b82df8472f34d6dabdc91d30a94d6ff6f59a4025eb10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL labelme2yolo-0.2.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 1.3 MB
Tags Linux glibc 2.17+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
61ef3aab2c183f96e23a838d90062e2fc91fb5035db451771f0c0b3e1f465525
BLAKE2b-256 checksum
How to use checksums
0cf8366d6e44205a4b8fb12b423bb37a88ff5c620f9bd415a2604311b14db3cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL labelme2yolo-0.2.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ef4f86cc9826ed2b623f15850f9ee8fef96f81aa9a95c78fc7a6108da868b3aa
BLAKE2b-256 checksum
How to use checksums
d33362c9cdf5097d9b051fb18c1f69349c613ea5465e3c3d3c471a2cac3dfcf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-macosx_11_0_arm64.whl

Download URL labelme2yolo-0.2.4-py3-none-macosx_11_0_arm64.whl
Size 1.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d535de4a7cd6e24508f0d5e6e7558448751394c5568a46a28e87c696ad812eab
BLAKE2b-256 checksum
How to use checksums
72d53247e5c862703d6de70729b37df80fdfa7017ab8e8939530f7415803e386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / labelme2yolo-0.2.4-py3-none-macosx_10_12_x86_64.whl

Download URL labelme2yolo-0.2.4-py3-none-macosx_10_12_x86_64.whl
Size 1.3 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b617877a10811574290e7f377ef1f0ee56b99f752a3ee930fb2e85475583ee9c
BLAKE2b-256 checksum
How to use checksums
e69263d68f4cecc009400f98dc237f3c2aaea4a77c9c01a9bf1b538e0837c937
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Security for labelme2yolo 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page