Open ilyasmg opened 5 years ago
I think one or more of your XML files is missing the
you have to check your xml file and tags in that xml file.
For example I got my xml files from labelbox.com (as a voc format) and every object has
xml_bndbox = _object.find("polygon")
bndbox = {
"xmin": float(xml_bndbox.find("x1").text),
"ymin": float(xml_bndbox.find("y1").text),
"xmax": float(xml_bndbox.find("x2").text),
"ymax": float(xml_bndbox.find("y2").text)
}
I also got my xml file from labelbox as voc format but I have both bndbox and polygon. Moreover, some xml files have x1 x2 x3 x4 y1 y2 y3 y4. I dont know how todeal with it.
I'm converting this dataset (https://www.di.ens.fr/willow/research/headdetection/) from xml to txt to use it in YOLO but I'm getting this error. VOC Parsing Result : False, msg : ERROR : 'NoneType' object has no attribute 'text', moreInfo : <class 'AttributeError'> Format.py 258
this is line 258 in Format.py tmp = { "name": _object.find("name").text }
Do you know how to solve it?