Fix issues and update version to 1.3.2
This commit is contained in:
parent
f55ef8ee8c
commit
7cf546b500
@ -1092,16 +1092,15 @@ class MainWindow(QMainWindow, WindowMixin):
|
|||||||
|
|
||||||
def saveFile(self, _value=False):
|
def saveFile(self, _value=False):
|
||||||
if self.defaultSaveDir is not None and len(ustr(self.defaultSaveDir)):
|
if self.defaultSaveDir is not None and len(ustr(self.defaultSaveDir)):
|
||||||
# print('handle the image:' + self.filePath)
|
|
||||||
if self.filePath:
|
if self.filePath:
|
||||||
imgFileName = os.path.basename(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)
|
savedPath = os.path.join(ustr(self.defaultSaveDir), savedFileName)
|
||||||
self._saveFile(savedPath)
|
self._saveFile(savedPath)
|
||||||
else:
|
else:
|
||||||
imgFileDir = os.path.dirname(self.filePath)
|
imgFileDir = os.path.dirname(self.filePath)
|
||||||
imgFileName = os.path.basename(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)
|
savedPath = os.path.join(imgFileDir, savedFileName)
|
||||||
self._saveFile(savedPath if self.labelFile
|
self._saveFile(savedPath if self.labelFile
|
||||||
else self.saveFileDialog())
|
else self.saveFileDialog())
|
||||||
|
|||||||
@ -158,6 +158,8 @@ class PascalVocReader:
|
|||||||
bndbox = object_iter.find("bndbox")
|
bndbox = object_iter.find("bndbox")
|
||||||
label = object_iter.find('name').text
|
label = object_iter.find('name').text
|
||||||
# Add chris
|
# Add chris
|
||||||
|
difficult = False
|
||||||
|
if object_iter.find('difficult') is not None:
|
||||||
difficult = bool(int(object_iter.find('difficult').text))
|
difficult = bool(int(object_iter.find('difficult').text))
|
||||||
self.addShape(label, bndbox, difficult)
|
self.addShape(label, bndbox, difficult)
|
||||||
return True
|
return True
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 1.3.1
|
current_version = 1.3.2
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -21,7 +21,7 @@ test_requirements = [
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='labelImg',
|
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",
|
description="LabelImg is a graphical image annotation tool and label object bounding boxes in images",
|
||||||
long_description=readme + '\n\n' + history,
|
long_description=readme + '\n\n' + history,
|
||||||
author="TzuTa Lin",
|
author="TzuTa Lin",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user