The script src/xml-to-yolo.py
can be used to convert annotation files
from the PASCAL VOC XML file format to the YOLO txt file format. It is
used like so:
$ python3 src/xml-to-yolo.py some-annotation-file.xml
Converted some-annotation-file.xml and wrote to some-annotation-file.txt
$ cat some-annotation-file.txt
0 0.786 0.851 0.190 0.292
To use it on multiple files at once, it can be scripted (in *nix:es):
$ for f in *.xml; do python src/xml-to-yolo.py $f; done