Traceback (most recent call last):
File "增强.py", line 184, in <module>
bndbox = read_xml_annotation(XML_DIR, name)
File "增强.py", line 38, in read_xml_annotation
bndbox = root.find('object').find('bndbox')
AttributeError: 'NoneType' object has no attribute 'find'
查看是否有空标签的xml文件
也就是存在xml文件,但是图像上不显示,xml文件里也没有标签、框等数据信息。
解决办法:添加标签或者删除该样本。