Fix issue serializing qstring in pscal_voc_io.py
This commit is contained in:
parent
f563c164d0
commit
2df7b6e402
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user