Skip to content

A python script to convert COCO into Pascal VOC 2012 format

Notifications You must be signed in to change notification settings

rubycheen/convert-yolo-to-pascalvoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Convert-YOLO-to-PascalVOC

Last Page Update: 20/07/2020

A python script to convert YOLO into Pascal VOC 2012 format. It generates xml annotation file in PASCAL VOC format for Object Detection.

Notes

  • Make sure you have the dependencies listed on yolo_to_voc.py.

  • Update root path (where this script lies) in line 46. ROOT = 'coco'.

  • Let's say that you have a custom dataset, which is not included in COCO. eg ship. Add its name to YOLO_CLASSES=(), in the first position.

  • Remove images that are already in /coco/images, /coco/labels and /coco/outputs.

  • Put all your images at /coco/images folder.

  • Put corresponding annotations (.txt files) to /coco/labels

Prerequisites (my environment)

  • Python 3.8.3

  • Numpy

  • Opencv

Usage

Please to run this script use the command below :

python3 yolo_to_voc.py

or

python yolo_to_voc.py

Some academic projects

https://www.behance.net/carolinepacheco

Medium blog site

https://medium.com/@lolyne.pacheco

About

A python script to convert COCO into Pascal VOC 2012 format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%