From a7e3a32385f7a458c667af17d20b650cfb9fa73f Mon Sep 17 00:00:00 2001 From: tzutalin Date: Wed, 10 May 2017 21:26:51 +0800 Subject: [PATCH] Replace Difficult with difficult --- labelImg.py | 4 ++-- libs/pascal_voc_io.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 labelImg.py diff --git a/labelImg.py b/labelImg.py old mode 100644 new mode 100755 index b4c5e80a..fe2285e9 --- a/labelImg.py +++ b/labelImg.py @@ -132,7 +132,7 @@ class MainWindow(QMainWindow, WindowMixin): self.editButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) # Add chris - self.diffcButton = QCheckBox("Difficult") + self.diffcButton = QCheckBox("difficult") self.diffcButton.setChecked(False) self.diffcButton.stateChanged.connect(self.btnstate) @@ -434,7 +434,7 @@ class MainWindow(QMainWindow, WindowMixin): Shape.line_color = self.lineColor Shape.fill_color = self.fillColor # Add chris - Shape.Difficult = self.difficult + Shape.difficult = self.difficult def xbool(x): if isinstance(x, QVariant): diff --git a/libs/pascal_voc_io.py b/libs/pascal_voc_io.py index d47fe587..9119381f 100644 --- a/libs/pascal_voc_io.py +++ b/libs/pascal_voc_io.py @@ -94,7 +94,7 @@ class PascalVocWriter: truncated.text = "1" # max == width or min else: truncated.text = "0" - difficult = SubElement(object_item, 'Difficult') + difficult = SubElement(object_item, 'difficult') difficult.text = str( bool(each_object['difficult']) & 1 ) bndbox = SubElement(object_item, 'bndbox') xmin = SubElement(bndbox, 'xmin') @@ -158,6 +158,6 @@ class PascalVocReader: bndbox = object_iter.find("bndbox") label = object_iter.find('name').text # Add chris - difficult = bool(int(object_iter.find('Difficult').text)) + difficult = bool(int(object_iter.find('difficult').text)) self.addShape(label, bndbox, difficult) return True