Skip to content

adrirg9412/label-format-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Label format converter

If you have ever downloaded a public dataset to play with YOLO but found that the labels come in a different format, such as CVAT, COCO or PASCAL-VOC, I have created this script to make the conversion task easier.

I have tried to make it as modular as possible so that it can be integrated in other projects.

I hope you find it useful.

Dependencies

cd label-format-converter
python3 -m pip install -r requeriments.txt

Usage

Convert labels to YOLO format.

  1. Place your labels into the correct folder.
    • CVAT: ~/label-format-converter/labels/cvat/*.xml
    • COCO: ~/label-format-converter/labels/coco/*.json
    • PASCAL: ~/label-format-converter/label/Annotations/*.xml
  2. (CVAT/COCO) Rename labels file.
    • CVAT: annotations.xml
    • COCO: instances_default.xml
  3. Update res/classes.json with the classes of the dataset
  4. Launch de main script with the origin format label as argument.
cd label-format-converter
python3 main.py [-f --format] [cvat, coco, pascal]
  1. Yolo folder will be created and the new labels will be placed in the next directory: ~/label-format-converter/labels/yolo

License

GNU GPL

Author

Code with 💛 by Adrián Rodríguez Galisteo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages