👉 Convert object detection dataset format 👈
Dataset types
PASCAL VOC: Pascal voc dataset have a xml file for each image.
YOLO: YOLO dataset have a txt file for each image.
COCO: COCO dataset have a json file for each image.
Current support format
Currently, the following formats are supported:
| from | to | implemented |
|---|---|---|
| PASCAL VOC | YOLO(TXT files) | Yes |
| YOLO | PASCAL VOC (XML files) | Yes |
Upcoming support format
| from | to | Issue/PR(if any) |
|---|---|---|
| PASCAL VOC | COCO (JSON files) | No |
| PASCAL VOC | TFRecord (TFRecord files) | No |
| COCO | PASCAL VOC (XML files) | No |
| COCO | YOLO (TXT files) | No |
| COCO | TFRecord (TFRecord files) | No |
| YOLO | COCO (JSON files) | No |
| YOLO | TFRecord (TFRecord files) | No |
Installation
Installation from source code
git clone https://github.com/codePerfectPlus/dataset-convertor/
cd dataset-convertor
python -m venv venv
source venv/bin/activate
pip install requirements.txt
Installation from PyPI
pip install dataset-convertor
Usage
convert annotations from one format to another format.
dataset formatting example:
- data/pascal_voc/JPEGImages/*.jpg
- data/pascal_voc/Annotations/*.xml
- data/yolo5/JPEGImages/*.jpg
- data/yolo5/labels/*.txt
Pascal VOC(xml) to yolo(txt)
from convert import Convertor
con = Convertor(input_folder='/home/user/data/pascal_voc', output_folder='/home/user/data/yolo5')
con.voc2yolo()
from yolo(txt) to Pascal VOC(xml)
from convert import Convertor
con = Convertor(input_folder='/home/user/data/yolo5', output_folder='/home/user/data/pascal_voc')
con.yolo2voc()
Contributing
create an issue/PR if any format is missing.Open-source contribution is welcome.check the contributing guide for details.
Reference
- PASCAL VOC - http://host.robots.ox.ac.uk/pascal/VOC/
- COCO - http://cocodataset.org/
- YOLO9000 - https://arxiv.org/abs/1612.08242
- YOLO4 - https://arxiv.org/abs/2004.10934v1
License
Authors
Metadata
Release files for dataset-convertor 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dataset-convertor-0.0.2.tar.gz | 5.1 kB | Without provenance | Details for dataset-convertor-0.0.2.tar.gz |
Release files / dataset-convertor-0.0.2.tar.gz
| Download URL | dataset-convertor-0.0.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70f25ce228396a12d5b51bfca9a5f16b96484ee4bce4f3a8135324bf9a668647
|
|
BLAKE2b-256 checksum How to use checksums |
a14d115fded990a114ad5e4e8cc5df1c58561d954eb443dd00fccd08a8ef83f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Security for dataset-convertor 0.0.2
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.