프로젝트

일반

사용자정보

개정판 424bad99

ID424bad99a3a5c0dae0c25ea7e948f87f18482094
상위 382ee77e
하위 e6185609

함의성이(가) 약 6년 전에 추가함

build issue #655: cmd

차이점 보기:

DTI_PID/DTI_PID/TrainingImageListDialog.py
281 281
            #trainCmd = tesseract_cmd + ' ' + trainingImgPath + ' ' + trainingBoxPath.replace('.box', '') + ' nobatch box.train' + ' >> output.log'
282 282
            #trainCmd = '\"' + tesseract_cmd + ' ' + trainingImgPath + ' ' + trainingBoxPath.replace('.box', '') + ' nobatch box.train &timeout 15' + '\"'
283 283
            #trainCmd = '\"' + tesseract_cmd + ' ' + trainingImgPath + ' ' + trainingBoxPath.replace('.box', '') + ' nobatch box.train' + '\"'
284
            trainCmd = '\"' + tesseract_cmd + '\"' + ' ' + trainingImgPath + ' ' + trainingBoxPath.replace('.box', '') + ' nobatch box.train' + ' >> output1.log'
284
            trainCmd = '\"' + tesseract_cmd + '\"' + ' ' + trainingImgPath + ' ' + trainingBoxPath.replace('.box', '') + ' nobatch box.train' + ' &timeout 15'
285 285
            subprocess.call(trainCmd, shell = True)
286
            os.system(trainCmd)
286 287
        
287 288
            #unicharsetExtractorCmd = unicharset_extractor_cmd + ' ' + trainingBoxPath + " >> output.log"
288 289
            unicharsetExtractorCmd = '\"' + unicharset_extractor_cmd + '\"' + ' ' + trainingBoxPath
289
            subprocess.call(unicharsetExtractorCmd, shell = True)
290
            ##subprocess.call(unicharsetExtractorCmd, shell = True)
291
            os.system(unicharsetExtractorCmd)
290 292
            #QMessageBox.question(self, 'tesseract', trainCmd, QMessageBox.Yes, QMessageBox.Cancel)
291 293
        
292
            #os.system(trainCmd)
293
            #os.system(unicharsetExtractorCmd)
294

  
295 294
            inputUnicharset = os.path.join(runningPath, 'unicharset')
296 295
            #outputUnicharset = os.path.join(project.getTrainingFilePath(), 'unicharset')
297 296
            scriptPath = ' --script_dir=//langdata-master'
298
            setUnicharsetPropertiesCmd = '\"' + set_unicharset_properties_cmd + '\" -U ' + inputUnicharset + ' -O ' + inputUnicharset + scriptPath + ' >> output2.log'
299
            subprocess.call(setUnicharsetPropertiesCmd, shell = True)
297
            setUnicharsetPropertiesCmd = '\"' + set_unicharset_properties_cmd + '\" -U ' + inputUnicharset + ' -O ' + inputUnicharset + scriptPath + ' &timeout 15'
298
            ##subprocess.call(setUnicharsetPropertiesCmd, shell = True)
299
            os.system(setUnicharsetPropertiesCmd)
300 300
        
301 301
            fontProperty = os.path.join(project.getTrainingFilePath(), 'font_properties')
302 302
            fw = open(fontProperty, 'w', encoding='utf8')
......
304 304
            fw.close()
305 305

  
306 306
            trPath = os.path.join(project.getTrainingFilePath(), oCRLang + '.' + oCRLang + 'F.exp0.tr')
307
            shapeclusteringCmd = '\"' + shapeclustering_cmd + '\" -F ' + fontProperty + ' -U ' + inputUnicharset + ' ' + trPath + ' >> output3.log'
308
            subprocess.call(shapeclusteringCmd, shell = True)
307
            shapeclusteringCmd = '\"' + shapeclustering_cmd + '\" -F ' + fontProperty + ' -U ' + inputUnicharset + ' ' + trPath + ' &timeout 15'
308
            ##subprocess.call(shapeclusteringCmd, shell = True)
309
            os.system(shapeclusteringCmd)
309 310

  
310 311
            #outputLangUnicharset = os.path.join(project.getTrainingFilePath(), 'seed.unicharset')
311
            mftrainingCmd = '\"' + mftraining_cmd + '\" -F ' + fontProperty + ' -U ' + inputUnicharset + ' -O ' + inputUnicharset + ' ' + trPath + ' >> output4.log'
312
            subprocess.call(mftrainingCmd, shell = True)
312
            mftrainingCmd = '\"' + mftraining_cmd + '\" -F ' + fontProperty + ' -U ' + inputUnicharset + ' -O ' + inputUnicharset + ' ' + trPath + ' &timeout 15'
313
            ##subprocess.call(mftrainingCmd, shell = True)
314
            os.system(mftrainingCmd)
313 315

  
314
            cntrainingCmd = '\"' + cntraining_cmd + '\" ' + trPath + ' >> output5.log'
315
            subprocess.call(cntrainingCmd, shell = True)
316
            cntrainingCmd = '\"' + cntraining_cmd + '\" ' + trPath + ' &timeout 15'
317
            ##subprocess.call(cntrainingCmd, shell = True)
318
            os.system(cntrainingCmd)
316 319

  
317 320
            if os.path.isfile(os.path.join(runningPath, oCRLang + '.inttemp')):
318 321
                os.remove(os.path.join(runningPath, oCRLang + '.inttemp'))

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)