개정판 6e10659e
build issue #655: shell output test
DTI_PID/DTI_PID/TrainingImageListDialog.py | ||
---|---|---|
265 | 265 |
trainingTextImg.save(trainingImgPath, compression='tiff_lzw') |
266 | 266 |
fw = open(trainingBoxPath, 'w', encoding='utf8') |
267 | 267 |
fw.write(outBox) |
268 |
fw.close() |
|
268 |
fw.close() |
|
269 |
|
|
270 |
except Exception as ex: |
|
271 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
272 |
|
|
273 |
#try: |
|
274 |
# 실제 적용 데이터 생성 3단계진행 |
|
275 |
trainCmd = tesseract_cmd + ' ' + trainingImgPath + ' ' + trainingBoxPath.replace('.box', '') + ' nobatch box.train' |
|
276 |
subprocess.call(trainCmd, shell = True) |
|
269 | 277 |
|
270 |
# 실제 적용 데이터 생성 3단계진행 |
|
271 |
trainCmd = tesseract_cmd + ' ' + trainingImgPath + ' ' + trainingBoxPath.replace('.box', '') + ' nobatch box.train' |
|
272 |
subprocess.call(trainCmd, shell = True) |
|
278 |
unicharsetExtractorCmd = unicharset_extractor_cmd + ' ' + trainingBoxPath |
|
273 | 279 |
|
274 |
unicharsetExtractorCmd = unicharset_extractor_cmd + ' ' + trainingBoxPath
|
|
280 |
subprocess.call(unicharsetExtractorCmd, shell = True)
|
|
275 | 281 |
|
276 |
subprocess.call(unicharsetExtractorCmd, shell = True) |
|
282 |
os.system(trainCmd) |
|
283 |
os.system(unicharsetExtractorCmd) |
|
277 | 284 |
|
278 | 285 |
#setUnicharsetPropertiesCmd = set_unicharset_properties_cmd + |
279 |
|
|
280 |
|
|
281 |
except Exception as ex: |
|
282 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
286 |
#except Exception as ex: |
|
287 |
#print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
283 | 288 |
|
284 | 289 |
''' |
285 | 290 |
@brief make Box data by button click |
내보내기 Unified diff