프로젝트

일반

사용자정보

개정판 4d2aa82f

ID4d2aa82facbb6a456df8dbcf9ba4d58a00123a65
상위 d559e1d7
하위 9bdbbda1

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

issue #1366: deep ocr test

Change-Id: I9fc2a6de2181aa713b6b4d07f5422e5d8f363063

차이점 보기:

DTI_PID/DTI_PID/TextDetector.py
41 41
        try:
42 42
            return self.getTextAreaInfo(img, offset[0], offset[1])
43 43
        except Exception as ex:
44
            print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
45
                                                       sys.exc_info()[-1].tb_lineno))
44
            from App import App
45
            from AppDocData import MessageType
46
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
47
                                                          sys.exc_info()[-1].tb_lineno)
48
            App.mainWnd().addMessage.emit(MessageType.Error, message)
46 49

  
47
        return None, None
50
        return [], None
48 51

  
49 52
    def decode_predictions(self, scores, geometry):
50 53
        # grab the number of rows and columns from the scores volume, then
DTI_PID/DTI_PID/tesseract_ocr_module.py
109 109
        imgWidth = im.width
110 110
        imgHeight = im.height
111 111

  
112
        '''
113
        # for deep text detection test
114
        import uuid
115
        im.save(app_doc_data.getCurrentProject().getTempPath() + '\\' + str(uuid.uuid4()) + '.png')
116
        '''
117

  
112 118
        boundaryOcrData = pytesseract.image_to_boxes(im, config=_conf, lang=oCRLang)
113 119
        bounding_boxes = boundaryOcrData.split('\n')
114 120

  
DTI_PID/WebServer/app.py
4 4
import sys, os
5 5

  
6 6
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '\\CRAFT_pytorch_master')
7
#sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '\\deep_text_recognition_benchmark_master')
7 8

  
8 9
app = Flask(__name__)
9 10

  

내보내기 Unified diff

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