Skip to content

Instantly share code, notes, and snippets.

Amir22010 /
Created Feb 22, 2020 — forked from myounus96/
convert pascal voc dataset to yolo format

Convert PascalVOC Annotations to YOLO

This script reads PascalVOC xml files, and converts them to YOLO txt files.

Note: This script was written and tested on Ubuntu. YMMV on other OS's.

Disclaimer: This code is a modified version of Joseph Redmon's


  1. Place the file into your data folder.