diff --git a/libs/pascal_voc_io.py b/libs/pascal_voc_io.py index 58a5b1e2..9930b666 100644 --- a/libs/pascal_voc_io.py +++ b/libs/pascal_voc_io.py @@ -6,6 +6,8 @@ from xml.etree.ElementTree import Element, SubElement from lxml import etree import codecs from libs.constants import DEFAULT_ENCODING +from libs.ustr import ustr + XML_EXT = '.xml' ENCODE_METHOD = DEFAULT_ENCODING @@ -85,8 +87,7 @@ class PascalVocWriter: for each_object in self.boxlist: object_item = SubElement(top, 'object') name = SubElement(object_item, 'name') - print (each_object['name']) - name.text = each_object['name'] + name.text = ustr(each_object['name']) pose = SubElement(object_item, 'pose') pose.text = "Unspecified" truncated = SubElement(object_item, 'truncated')