Skip to main content

Convert Dataset from one format to another format

Project description

website title image

👉 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

git clone https://github.com/codePerfectPlus/dataset-convertor/
cd dataset-convertor
python -m venv venv
source venv/bin/activate
pip install requirements.txt

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
# example command for pascal-voc(xml) to yolo(txt)
python main.py --input-folder ./data/pascal_voc \
                  --output-folder ./output/yolo5 \
                  --input-format  voc \
                  --output-format yolo

Contributing

create an issue/PR if any format is missing.Open-source contribution is welcome.check the contributing guide for details.

Reference

License

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dataset-convertor-0.0.1.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file dataset-convertor-0.0.1.tar.gz.

File metadata

  • Download URL: dataset-convertor-0.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for dataset-convertor-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dcb30de66bf92c34f0301a2996277eac8b4bae7d33c940de2e3dad51c503b237
MD5 2554bf2b325e854460e8d4eeb07675e9
BLAKE2b-256 2bad3f8548599ddf666f37106930624d703c05648f6fe1f71cb4b22a376b78df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page