VOC2007数据转YOLO格式

(1) 下载VOC数据集

参考博客https://blog.csdn.net/qq_41884867/article/details/90237145
在这里插入图片描述

(2) 将xml文件转txt

运行xml2txt.py , 将VOCdevkit/Annotation下所有xml格式的文件转yolo标注格式的.txt文件,完整代码如下:

import xml.etree.ElementTree as ET
import os, cv2
import numpy as np
from os import listdir

猜你喜欢

转载自blog.csdn.net/weixin_38346042/article/details/129793027