文件目录
Annotations中是XML文件。
JPEGImages中是对应的JPG文件
XML文件
要截取bndbox坐标中的内容。
python代码
# -*- coding: utf-8 -*-
# @Time : 2020/2/8 22:14
# @Author : SanZhi
# @File : get_xml.py
# @Software: PyCharm
import cv2
import numpy as np
import xml.dom.minidom
import os
import argparse
def main():
# JPG文件的地址
img_path = 'D:/ser/JPEGImages/'
# XML文件的地址
ann