labelImg2yolo.py
VOC格式数据集转换成YOLO格式数据集。 import xml.etree.ElementTree as ET import pickle import os from os import listdir, getcwd from os.path import join import random from shutil import copyfile #类别名classes = ["with_mask","without_mask"] #训练集和验证集的比例TRAIN_RATIO = 0.8 def clear_hidden_files(path): dir_list = os.listdir(path) for i in dir_list: abspath = os.path.join(os.path.abspath(path), i) if os.path.isfile(abspath): if i.startswith("._"): ...
用户评论