上传者: 38529251 
                                    |
                                    上传时间: 2021-09-10 23:40:21
                                    |
                                    文件大小: 37KB
                                    |
                                    文件类型: PDF
                                
                            
                                
                            
                                前段时间用到了yolov3训练自己的数据集,发现里面的voc_label.py xml标签文件转成txt文件,稍微有点不太方便。所以在它的基础上自己稍微改了下,以便日后使用。下面是代码:
import xml.etree.ElementTree as ET
import pickle
import os
from os import listdir, getcwd
from os.path import join
# !!!!!!!!!
# 使用说明:
#     1:在存放xml的文件夹里使用cmd命令:dir /b /on /a /s >list.txt 生成xml的list.txt列表