개정판 56b84c15
issue #000: sba
Change-Id: I1638e35729b6fd834f4f1e13c1d81c56662c057a
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
678 | 678 |
sql = """SELECT a.UID,a.Name,b.Type,a.Threshold,a.MinMatchPoint,a.IsDetectOrigin,a.RotationCount, |
679 | 679 |
a.OCROption,a.IsContainChild,a.OriginalPoint,a.ConnectionPoint,a.BaseSymbol,a.AdditionalSymbol,a.Width,a.Height, |
680 | 680 |
a.IsExceptDetect,a.HasInstrumentLabel,a.flip,a.TextArea,b.UID as DB_UID FROM Symbol a inner join SymbolType b on |
681 |
a.SymbolType_UID=b.UID order by width * height desc""" |
|
681 |
a.SymbolType_UID=b.UID WHERE a.[SymbolType_UID] != -1 order by width * height desc"""
|
|
682 | 682 |
try: |
683 | 683 |
cursor.execute(sql) |
684 | 684 |
rows = cursor.fetchall() |
DTI_PID/DTI_PID/ConfigurationDialog.py | ||
---|---|---|
522 | 522 |
configs = docData.getConfigs('Engine', 'Threshold') |
523 | 523 |
self.ui.spinBoxServerSymbol.setValue(int(configs[0].value) if configs else 25) |
524 | 524 | |
525 |
#configs = docData.getConfigs('Result', 'YOLO') |
|
526 |
configs = docData.getConfigs('Result', 'SSD') |
|
527 |
if not configs: |
|
528 |
self.ui.radioButtonAI2.setEnabled(False) |
|
529 |
configs = docData.getConfigs('Result', 'FRCNN') |
|
530 |
if not configs: |
|
531 |
self.ui.radioButtonAI3.setEnabled(False) |
|
532 | ||
525 | 533 |
configs = docData.getConfigs('Engine', 'OCR') |
526 | 534 |
if configs: |
527 | 535 |
size = int(configs[0].value) |
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
801 | 801 |
project = app_doc_data.getCurrentProject() |
802 | 802 |
textDetector = TextDetector() |
803 | 803 | |
804 |
Worker.initTargetSymbolDataList() |
|
804 |
configs = app_doc_data.getConfigs('Engine', 'Symbol') |
|
805 |
if (configs and int(configs[0].value) is 1) or not configs or worker.isTrainingChecked: |
|
806 |
Worker.initTargetSymbolDataList() |
|
807 |
else: |
|
808 |
Worker.initTargetSymbolDataList(all=True) |
|
805 | 809 | |
806 | 810 |
for drawing in drawings: |
807 | 811 |
ocrCompletedSrc = [] |
... | ... | |
1199 | 1203 |
conn.connectedItem = None |
1200 | 1204 |
#worker.scene.removeItem(lineItem) |
1201 | 1205 | |
1206 |
''' |
|
1202 | 1207 |
# try to detect nozzle from image drawing |
1203 | 1208 |
if worker.isSymbolChecked: |
1204 | 1209 |
worker.displayTitle.emit(worker.tr('Detecting nozzle and flange...')) |
... | ... | |
1217 | 1222 |
for nozzle in nozzles: |
1218 | 1223 |
Worker.remove_detected_symbol_image(nozzle, app_doc_data.imgSrc) |
1219 | 1224 |
# up to here |
1225 |
''' |
|
1220 | 1226 | |
1221 | 1227 |
area = app_doc_data.getArea('Drawing') |
1222 | 1228 |
if area is not None: |
... | ... | |
2033 | 2039 |
''' |
2034 | 2040 | |
2035 | 2041 |
@staticmethod |
2036 |
def initTargetSymbolDataList(): |
|
2042 |
def initTargetSymbolDataList(all=False):
|
|
2037 | 2043 |
global targetSymbolList |
2038 | 2044 | |
2039 | 2045 |
targetSymbolList.clear() |
2040 | 2046 |
app_doc_data = AppDocData.instance() |
2041 |
symbolList = app_doc_data.getTargetSymbolList() |
|
2047 |
symbolList = app_doc_data.getTargetSymbolList(all=all)
|
|
2042 | 2048 |
equipments = [item for item in symbolList if app_doc_data.getSymbolCategoryByType(item.getType()) == 'Equipment'] |
2043 | 2049 |
nozzles = [item for item in symbolList if item.getType() == 'Nozzles'] |
2044 | 2050 |
# [[equipments],[nozzles],[symbols]] |
... | ... | |
3455 | 3461 |
hasInstrumentLabel = targetSymbol.getHasInstrumentLabel() |
3456 | 3462 |
text_area = targetSymbol.getText_area() |
3457 | 3463 | |
3464 |
''' |
|
3458 | 3465 |
# check if symbol file is target or not |
3459 | 3466 |
if isExceptDetect == 1: |
3460 | 3467 |
item = QListWidgetItem('{} file is not target'.format(symbolName)) |
3461 | 3468 |
item.setBackground(QColor('green')) |
3462 | 3469 |
listWidget.addItem(item) |
3463 | 3470 |
continue |
3471 |
''' |
|
3464 | 3472 | |
3465 | 3473 |
foundSymbolCount = 0 |
3466 | 3474 |
내보내기 Unified diff