개정판 fa83a646
issue #1366: fix streamer
Change-Id: I4a95b3cdf1fcc85af2ff06d0df4570d66ddee5fd
DTI_PID/WebServer/app/recognition/index.py | ||
---|---|---|
23 | 23 |
|
24 | 24 |
|
25 | 25 |
def recognition(params=None): |
26 |
if params[0] == 'Text Area': |
|
27 |
res = text_craft.get_text_box_batch(params[1]) |
|
28 |
return ['Text Area', res]
|
|
26 |
if params[0][0] == 'Text Area':
|
|
27 |
res = text_craft.get_text_box_batch(params[0][1])
|
|
28 |
return [res] |
|
29 | 29 |
elif params[0] == 'Symbol': |
30 | 30 |
pass |
31 | 31 |
|
... | ... | |
112 | 112 |
infos = [['Text Area', [None, None, os.path.dirname( |
113 | 113 |
os.path.realpath(__file__)) + '\\..\\..\\CRAFT_pytorch_master\\weights\\craft_mlt_25k.pth', imgs]]] |
114 | 114 |
boxes = streamer.predict(infos) |
115 |
boxes_list = boxes[1][0]
|
|
115 |
boxes_list = boxes[0][0]
|
|
116 | 116 |
|
117 | 117 |
return jsonify({'text_box_list': boxes_list}) |
내보내기 Unified diff