Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 1.76 KB

README.md

File metadata and controls

76 lines (54 loc) · 1.76 KB

annotations-convertor

script for convert annotations from one format to another format

python convert.py --input-folder ./data/input \
                  --output-folder ./data/output \
                  --input-format  \
                  --output-format

Dataset types

Current support format

Currently, the following formats are supported:

from to implemented
PASCAL VOC YOLO(TXT files) Yes
PASCAL VOC COCO (JSON files) No
COCO PASCAL VOC (XML files) No
COCO YOLO (TXT files) No
YOLO COCO (JSON files) No
YOLO PASCAL VOC (XML files) Yes

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 convert.py --input-folder ./data/pascal_voc \
                  --output-folder ./output/yolo5 \
                  --input-format  voc \
                  --output-format yolo

Reference

License

Authors