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
|
from lxml import etree
|
||||||
import codecs
|
import codecs
|
||||||
from libs.constants import DEFAULT_ENCODING
|
from libs.constants import DEFAULT_ENCODING
|
||||||
|
from libs.ustr import ustr
|
||||||
|
|
||||||
|
|
||||||
XML_EXT = '.xml'
|
XML_EXT = '.xml'
|
||||||
ENCODE_METHOD = DEFAULT_ENCODING
|
ENCODE_METHOD = DEFAULT_ENCODING
|
||||||
@ -85,8 +87,7 @@ class PascalVocWriter:
|
|||||||
for each_object in self.boxlist:
|
for each_object in self.boxlist:
|
||||||
object_item = SubElement(top, 'object')
|
object_item = SubElement(top, 'object')
|
||||||
name = SubElement(object_item, 'name')
|
name = SubElement(object_item, 'name')
|
||||||
print (each_object['name'])
|
name.text = ustr(each_object['name'])
|
||||||
name.text = each_object['name']
|
|
||||||
pose = SubElement(object_item, 'pose')
|
pose = SubElement(object_item, 'pose')
|
||||||
pose.text = "Unspecified"
|
pose.text = "Unspecified"
|
||||||
truncated = SubElement(object_item, 'truncated')
|
truncated = SubElement(object_item, 'truncated')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user