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:
@@ -49,3 +49,4 @@ class LabelDialog(QDialog):
|
||||
def listItemClick(self, tQListWidgetItem):
|
||||
text = tQListWidgetItem.text().trimmed()
|
||||
self.edit.setText(text)
|
||||
self.validate()
|
||||
|
||||
+14
-4
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user