labelme2yolov8
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: spatiallysaying
- Language: Python
- Default Branch: main
- Size: 11.7 KB
Statistics
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Labelme2YOLOv8
Forked from greatv/labelme2yolo
Labelme2YOLOv8 is a powerful tool for converting LabelMe's JSON dataset Yolov8 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 YOLOv8 segmentation)
Existing Structure (YOLOv5 v7.0)
YOLODataset
- images
- test
- train
- val
- labels
- test
- train
- val
- images
Updated Structure (YOLOv8)
YOLOv8Dataset
- test
- images
- labels
train
- images
- labels
val
- images
- labels
- test
Installation
shell
pip install labelme2yolov8
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.2 means 20% 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, 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:
shell
python -m labelme2yolov8 --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
```plaintext /path/to/labelmejsondir/YOLOv8Dataset/train/labels/ /path/to/labelmejsondir/YOLOv8Dataset/test/labels/ /path/to/labelmejsondir/YOLOv8Dataset/val/labels/ /path/to/labelmejsondir/YOLOv8Dataset/train/images/ /path/to/labelmejsondir/YOLOv8Dataset/test/images/ /path/to/labelmejsondir/YOLOv8Dataset/val/images/
/path/to/labelmejsondir/YOLOv8Dataset/dataset.yaml ```
2. Converting JSON files and splitting training and validation datasets by folders
If you have split the LabelMe training dataset and validation dataset on your own, please put these folders under labelme_json_dir as shown below:
plaintext
/path/to/labelme_json_dir/train/
/path/to/labelme_json_dir/val/
This tool will read the training and validation datasets by folder. You may run the following command to do this:
shell
python -m labelme2yolov8 --json_dir /path/to/labelme_json_dir/
This tool will generate dataset labels and images with YOLO format in different folders, such as
```plaintext /path/to/labelmejsondir/YOLOv8Dataset/train/labels/ /path/to/labelmejsondir/YOLOv8Dataset/val/labels/ /path/to/labelmejsondir/YOLOv8Dataset/train/images/ /path/to/labelmejsondir/YOLOv8Dataset/val/images/
/path/to/labelmejsondir/YOLOv8Dataset/dataset.yaml ```
How to build package/wheel
- install hatch
- Run the following command:
shell
hatch build
License
labelme2yolov8 is distributed under the terms of the MIT license.
Owner
- Login: spatiallysaying
- Kind: user
- Repositories: 1
- Profile: https://github.com/spatiallysaying
Citation (citation.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Dhulipudi" given-names: "Durga Prasad" orcid: "https://orcid.org/0000-0003-0855-5230" title: "Labelme2YOLOv8: Powerful tool for converting LabelMe's JSON dataset to YOLOv8 format. " url: "https://pypi.org/project/Labelme2YOLOv8/" license: GPL-3
GitHub Events
Total
- Watch event: 7
- Fork event: 1
Last Year
- Watch event: 7
- Fork event: 1
Packages
- Total packages: 1
-
Total downloads:
- pypi 124 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
pypi.org: labelme2yolov8
Labelme2YOLOv8 is a powerful tool for converting LabelMe's JSON dataset to YOLOv8 format.
- Homepage: https://github.com/spatiallysaying/Labelme2YOLOv8
- Documentation: https://labelme2yolov8.readthedocs.io/
-
Latest release: 0.1.4
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- Pillow *
- numpy *
- opencv-python *
- tqdm *
- Pillow *
- add *
- numpy *
- opencv-python *
- tqdm *