Utility functions to parse json file generated by labelme
Project description
labelme-parse
Utility functions to parse json file generated by labelme
Installation
You can install the package via pip:
pip install labelme-parse
Usage
from pathlib import Path
from labelme_parse import get_point
from labelme_parse import get_point_names
from labelme_parse import get_poly
from labelme_parse import get_poly_names
from labelme_parse import get_rect
from labelme_parse import get_rect_names
d = Path("path/to/dir")
print(get_point_names(d))
# ["dp_7_to_dp_0"]
print(get_rect_names(d))
# ["dp_0"]
print(get_poly_names(d))
# ["dp_8"]
print(get_point(d, "dp_7_to_dp_0"))
# (329, 919)
print(get_rect(d, "dp_0"))
# (301, 897, 38, 38)
print(get_poly(d, "dp_8"))
# [(317, 909), (309, 909), (309, 914), (313, 914), (313, 920), (327, 920), (327, 914), (331, 914), (331, 909), (322, 909), (322, 907), (317, 907)]
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
labelme_parse-1.0.9.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file labelme_parse-1.0.9.tar.gz
.
File metadata
- Download URL: labelme_parse-1.0.9.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87054f0c71394538581faaea3be0f6d2b638d8b2e0f2d31ad8cda1641cbff3e8 |
|
MD5 | b13f167495a835b09f9bb10010bc02fa |
|
BLAKE2b-256 | ac26f849c7c6106f8776dcfb7082c20203a79d51a8876d2529aab70da400066a |
File details
Details for the file labelme_parse-1.0.9-py3-none-any.whl
.
File metadata
- Download URL: labelme_parse-1.0.9-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0743a9c1c7078b6ced7c565cb1518f580f3dd699cb6948ecae82470633cb0ae8 |
|
MD5 | 00b5d783a9621f34b001a40e809f5d08 |
|
BLAKE2b-256 | bc89bca743708a3533c31d341badd30fc26b8a793754bc1aae7e723f2cfaa5c9 |