Skip to content

Commit

Permalink
Fix issues and update version to 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tzutalin committed May 18, 2017
1 parent f55ef8e commit 7cf546b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions labelImg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,16 +1092,15 @@ def openFile(self, _value=False):

def saveFile(self, _value=False):
if self.defaultSaveDir is not None and len(ustr(self.defaultSaveDir)):
# print('handle the image:' + self.filePath)
if self.filePath:
imgFileName = os.path.basename(self.filePath)
savedFileName = os.path.splitext(imgFileName)[0] + LabelFile.suffix
savedFileName = os.path.splitext(imgFileName)[0] + XML_EXT
savedPath = os.path.join(ustr(self.defaultSaveDir), savedFileName)
self._saveFile(savedPath)
else:
imgFileDir = os.path.dirname(self.filePath)
imgFileName = os.path.basename(self.filePath)
savedFileName = os.path.splitext(imgFileName)[0] + LabelFile.suffix
savedFileName = os.path.splitext(imgFileName)[0] + XML_EXT
savedPath = os.path.join(imgFileDir, savedFileName)
self._saveFile(savedPath if self.labelFile
else self.saveFileDialog())
Expand Down
4 changes: 3 additions & 1 deletion libs/pascal_voc_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def parseXML(self):
bndbox = object_iter.find("bndbox")
label = object_iter.find('name').text
# Add chris
difficult = bool(int(object_iter.find('difficult').text))
difficult = False
if object_iter.find('difficult') is not None:
difficult = bool(int(object_iter.find('difficult').text))
self.addShape(label, bndbox, difficult)
return True
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.3.1
current_version = 1.3.2
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

setup(
name='labelImg',
version='1.3.1',
version='1.3.2',
description="LabelImg is a graphical image annotation tool and label object bounding boxes in images",
long_description=readme + '\n\n' + history,
author="TzuTa Lin",
Expand Down

0 comments on commit 7cf546b

Please sign in to comment.