프로젝트

일반

사용자정보

개정판 f0cfc15f

IDf0cfc15ff9d4c8b60e83653d5a09e076f53f4c6d
상위 d8e1a15d
하위 33ccef35

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

issue #1366: improve batch

Change-Id: Ifa93167e23a940a93ca27a994e06151c9d2f9079

차이점 보기:

DTI_PID/WebServer/CRAFT_pytorch_master/text_craft.py
107 107
'''
108 108

  
109 109
def get_text_box_batch(infos):
110
    boxes_list = get_text_box(infos[3], infos[0], infos[1], infos[2])
110
    boxes_list = get_text_box_stream(infos[0][3], infos[0][0], infos[0][1], infos[0][2])
111 111

  
112 112
    return boxes_list
113 113

  
......
282 282

  
283 283
        box_craft_list.append(box_craft)
284 284

  
285
    return box_craft_list
285
    return [box_craft_list]
286 286

  
287 287

  
288 288
if __name__ == '__main__':
DTI_PID/WebServer/app.py
71 71
        boxes_list = boxes
72 72
        '''
73 73

  
74
        infos = [None, None, os.path.dirname(os.path.realpath(__file__)) + '\\CRAFT_pytorch_master\\weights\\craft_mlt_25k.pth', imgs]
74
        infos = [[None, None, os.path.dirname(os.path.realpath(__file__)) + '\\CRAFT_pytorch_master\\weights\\craft_mlt_25k.pth', imgs]]
75 75
        boxes = streamer.predict(infos)
76
        boxes_list = boxes
76
        boxes_list = boxes[0]
77 77

  
78 78
        return jsonify({'text_box_list': boxes_list})
79 79

  
DTI_PID/WebServer/service_streamer_master/service_streamer/service_streamer.py
165 165
    def model_predict(self, batch_input):
166 166
        batch_result = self._predict(batch_input)
167 167
        assert len(batch_input) == len(batch_result), "input batch size {} and output batch size {} must be equal.".format(len(batch_input), len(batch_result))
168
        #assert len(batch_input[3]) == len(batch_result), "input batch size {} and output batch size {} must be equal.".format(len(batch_input), len(batch_result))
168 169
        return batch_result
169 170

  
170 171
    def _run_once(self):

내보내기 Unified diff

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