개정판 b13fd95b
issue #1366: testing
Change-Id: I40590503626332c443b633a86f61ad0b6314c639
DTI_PID/DTI_PID/TextDataListDialog.py | ||
---|---|---|
144 | 144 |
def listCellClicked(self, row, col): |
145 | 145 |
from HighlightCommand import HighlightCommand |
146 | 146 |
|
147 |
if col is 1:
|
|
147 |
if col == 1:
|
|
148 | 148 |
self.ui.tableWidget.clearSelection() |
149 | 149 |
|
150 | 150 |
HighlightCommand(self.graphicsView).execute(self.ui.tableWidget.item(row, 1).tag) |
... | ... | |
161 | 161 |
col = self.ui.tableWidget.selectedIndexes()[0].column() |
162 | 162 |
from HighlightCommand import HighlightCommand |
163 | 163 |
if event.key() == Qt.Key_Up: |
164 |
if row is not 0:
|
|
164 |
if row != 0:
|
|
165 | 165 |
row -= 1 |
166 | 166 |
HighlightCommand(self.graphicsView).execute(self.ui.tableWidget.item(row, 1).tag) |
167 | 167 |
self.ui.tableWidget.setCurrentItem(self.ui.tableWidget.item(row, col)) |
DTI_PID/DTI_PID/TrainingSymbolEditorDialog.py | ||
---|---|---|
161 | 161 |
def pushButtonSplitClicked(self): |
162 | 162 |
self.isChanged = True |
163 | 163 |
items = self.graphicsViewTrainingDrawing.scene().selectedItems() |
164 |
if len(items) is not 1:
|
|
164 |
if len(items) == 1:
|
|
165 | 165 |
return |
166 | 166 |
rect = items[0].rect() |
167 | 167 |
secondBox = QTrainingBoxItem('', rect.x() + round(rect.width() / 2), rect.y(), round(rect.width() / 2), rect.height()) |
... | ... | |
181 | 181 |
totalWidth = 0 |
182 | 182 |
totalHeight = 0 |
183 | 183 |
count = 0 |
184 |
if len(items) is 1:
|
|
184 |
if len(items) == 1:
|
|
185 | 185 |
rect = items[0].rect() |
186 | 186 |
elif len(allItems) > 1: |
187 | 187 |
for item in allItems: |
... | ... | |
372 | 372 |
def spinBoxChangedEvent(self, event): |
373 | 373 |
self.isChanged = True |
374 | 374 |
items = self.graphicsViewTrainingDrawing.scene().selectedItems() |
375 |
if (len(items) is not 1) or self.spinBoxFlag:
|
|
375 |
if (len(items) != 1) or self.spinBoxFlag:
|
|
376 | 376 |
return |
377 | 377 |
spinBoxName = self.sender().objectName() |
378 | 378 |
rect = items[0].rect() |
DTI_PID/DTI_PID/TrainingSymbolImageListDialog.py | ||
---|---|---|
92 | 92 |
dataList = appDocData.getTrainingSymbolFileList() |
93 | 93 |
imgCount = 0 |
94 | 94 |
for data in dataList: |
95 |
if data.find('.png') is not -1:
|
|
95 |
if data.find('.png') != -1:
|
|
96 | 96 |
imgCount += 1 |
97 | 97 |
self.ui.tableWidgetList.setRowCount(imgCount) |
98 | 98 |
|
99 | 99 |
row = 0 |
100 | 100 |
for data in dataList: |
101 |
if data.find('.png') is not -1:
|
|
101 |
if data.find('.png') != -1:
|
|
102 | 102 |
self.ui.tableWidgetList.setItem(row, 0, QTableWidgetItem(str(row + 1))) |
103 | 103 |
self.ui.tableWidgetList.setItem(row, 1, QTableWidgetItem(data)) |
104 | 104 |
allDataList = appDocData.getTrainingSymbolFileList() |
105 | 105 |
for adata in allDataList: |
106 | 106 |
labelName = data.replace('.png', '.xml') |
107 |
if adata.find(labelName) is not -1:
|
|
107 |
if adata.find(labelName) != -1:
|
|
108 | 108 |
labelPath = os.path.join(project.getTrainingSymbolFilePath(), labelName) |
109 | 109 |
modifiedTime = str(datetime.datetime.strptime(time.ctime(os.path.getmtime(labelPath)), "%a %b %d %H:%M:%S %Y")) |
110 | 110 |
self.ui.tableWidgetList.setItem(row, 2, QTableWidgetItem(modifiedTime)) |
... | ... | |
231 | 231 |
img = Image.open(imgPath) |
232 | 232 |
images.append([img, imgPath]) |
233 | 233 |
|
234 |
if len(images) is 0:
|
|
234 |
if len(images) == 0:
|
|
235 | 235 |
continue |
236 | 236 |
|
237 | 237 |
grid_size = [None, None] |
... | ... | |
308 | 308 |
labelCount = [labelCounts[0], labelCounts[1]] |
309 | 309 |
self.labelList.append(labelCount) |
310 | 310 |
for data in dataList: |
311 |
if data.find('.xml') is not -1:
|
|
311 |
if data.find('.xml') != -1:
|
|
312 | 312 |
labelPath = os.path.join(project.getTrainingSymbolFilePath(), data) |
313 | 313 |
xml = parse(labelPath) |
314 | 314 |
root = xml.getroot() |
... | ... | |
387 | 387 |
dataList = appDocData.getTrainingSymbolFileList() |
388 | 388 |
isBoxFile = False |
389 | 389 |
for data in dataList: |
390 |
if data.find(labelName) is not -1:
|
|
390 |
if data.find(labelName) != -1:
|
|
391 | 391 |
isBoxFile = True |
392 | 392 |
traininglabelPath = os.path.join(project.getTrainingSymbolFilePath(), labelName) |
393 | 393 |
boundarySymbolData = None |
... | ... | |
401 | 401 |
imgNot = cv2.dilate(imgNot, np.ones((8,8), np.uint8)) |
402 | 402 |
|
403 | 403 |
contours, hierarchy = cv2.findContours(imgNot, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) |
404 |
if len(contours) is 0:
|
|
404 |
if len(contours) == 0:
|
|
405 | 405 |
pass |
406 | 406 |
else: |
407 | 407 |
for cnt in contours: |
DTI_PID/WebServer/.vscode/settings.json | ||
---|---|---|
1 | 1 |
{ |
2 |
"python.pythonPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\python.exe"
|
|
2 |
"python.pythonPath": "C:\\Program Files\\Python38\\python.exe"
|
|
3 | 3 |
} |
내보내기 Unified diff