#!/usr/bin/python
# -*- coding: utf-8 -*-
import xml.etree.ElementTree as ET
import os
LBAEL_ROOT = "E:/Python_WORKSPACE/Other_Code/xml文件解析/dlibXML2mobilenetssdXML/"
src_path=LBAEL_ROOT+"DlibXML/"
out_path=LBAEL_ROOT+"MobileNetssdXML/"
datasource="PhoneOne"
## Get pretty look
def indent( elem, level=0):
i = "\n" + level*" "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + " "
for e in elem:
indent(e, level+1)
if not e.tail or not e.tail.strip():
e.tail = i
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
return elem
def dlibXML_2_mobilenetssdXML(src_path,out_path):
m="1"
for xml_filename in os.listdir(src_path):
# 读取源xml文件
dataset <
Dlib格式标签文件转换为VOC格式文件
最新推荐文章于 2022-06-27 21:29:04 发布