https://github.com/tzutalin/labelImg/issues/31 add support for displaying and saving unicode labels
This commit is contained in:
parent
9a4c922d98
commit
03236397d7
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
import _init_path
|
||||
import codecs
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
@ -1060,7 +1061,7 @@ class MainWindow(QMainWindow, WindowMixin):
|
||||
def loadPredefinedClasses(self):
|
||||
predefined_classes_path = os.path.join('data', 'predefined_classes.txt')
|
||||
if os.path.exists(predefined_classes_path) is True:
|
||||
with open(predefined_classes_path) as f:
|
||||
with codecs.open(predefined_classes_path, 'r', 'utf8') as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if self.labelHist is None:
|
||||
|
||||
@ -74,7 +74,7 @@ class PascalVocWriter:
|
||||
for each_object in self.boxlist:
|
||||
object_item = SubElement(top, 'object')
|
||||
name = SubElement(object_item, 'name')
|
||||
name.text = str(each_object['name'])
|
||||
name.text = unicode(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