Merge features: 1.autoSaving while nexting 2.Add predefined classes 3. avoid using 0-valued coordinates, from https://github.com/tzutalin/labelImg/pull/1

This commit is contained in:
tzutalin
2015-11-20 23:43:03 +08:00
parent ef61f0d827
commit 66645103e5
4 changed files with 26 additions and 5 deletions
+1
View File
@@ -49,3 +49,4 @@ class LabelDialog(QDialog):
def listItemClick(self, tQListWidgetItem):
text = tQListWidgetItem.text().trimmed()
self.edit.setText(text)
self.validate()
+14 -4
View File
@@ -87,8 +87,18 @@ class LabelFile(object):
for p in points:
x = p[0]
y = p[1]
xmin = min(x,xmin)
ymin = min(y,ymin)
xmax = max(x,xmax)
ymax = max(y,ymax)
xmin = min(x,xmin)
ymin = min(y,ymin)
xmax = max(x,xmax)
ymax = max(y,ymax)
# Martin Kersner, 2015/11/12
# 0-valued coordinates of BB caused an error while
# training faster-rcnn object detector.
if (xmin < 1):
xmin = 1
if (ymin < 1):
ymin = 1
return (int(xmin), int(ymin), int(xmax), int(ymax))