import xml.etree.ElementTree as ET
import pickle
import os
from os import listdir, getcwd
from os.path import join
classes = ['person', 'forklift']
def convert(size, box):
dw = 1. / (size[0])
dh = 1. / (size[1])
x = (box[0] + box[1]) / 2.0 - 1
y = (box[2] + box[3]) / 2.0 - 1
w = box[1] - box[
Python实现遍历文件夹下xml文件转化为yolo格式的txt文件
最新推荐文章于 2022-01-06 22:10:03 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)