for i in range(0,len(yhat['rois'])):
ymin, xmin, ymax, xmax = yhat['rois'][i]
writer.addObject(classids[yhat['class_ids'][i]],xmin,ymin,xmax,ymax)
writer.save(‘path/to/img.xml’)
produces malformed PASCAL VOC xml files. Successive objects sections are not correctly aligned. Instead what you get is:
[Python 3.7.0] The code snippet is:
produces malformed PASCAL VOC xml files. Successive objects sections are not correctly aligned. Instead what you get is:
Everything is correctly aligned except for the
</object> <object>
. There is a missing newline character between closing and opening "object" tags.