개정판 d8e1a15d
issue #1366: speed test and license off
Change-Id: Idd6470cde55d6e7ce4ea1e70d8afcc7dca0772d8
DTI_PID/WebServer/app.py | ||
---|---|---|
53 | 53 |
imgs.append(img) |
54 | 54 |
|
55 | 55 |
boxes_list = [] |
56 |
''' |
|
56 | 57 |
for img in imgs: |
58 |
# faster |
|
59 |
#boxes = streamer.predict([[img, None, None, os.path.dirname(os.path.realpath(__file__)) + '\\CRAFT_pytorch_master\\weights\\craft_ic15_20k.pth']]) |
|
60 |
|
|
61 |
# More accurate |
|
57 | 62 |
boxes = streamer.predict([[img, None, None, os.path.dirname(os.path.realpath(__file__)) + '\\CRAFT_pytorch_master\\weights\\craft_mlt_25k.pth']]) |
58 | 63 |
boxes_list.append(boxes[0]) |
64 |
''' |
|
65 |
|
|
66 |
''' |
|
67 |
infos = [] |
|
68 |
for img in imgs: |
|
69 |
infos.append([img, None, None, os.path.dirname(os.path.realpath(__file__)) + '\\CRAFT_pytorch_master\\weights\\craft_mlt_25k.pth']) |
|
70 |
boxes = streamer.predict(infos) |
|
71 |
boxes_list = boxes |
|
72 |
''' |
|
73 |
|
|
74 |
infos = [None, None, os.path.dirname(os.path.realpath(__file__)) + '\\CRAFT_pytorch_master\\weights\\craft_mlt_25k.pth', imgs] |
|
75 |
boxes = streamer.predict(infos) |
|
76 |
boxes_list = boxes |
|
77 |
|
|
59 | 78 |
return jsonify({'text_box_list': boxes_list}) |
60 | 79 |
|
61 | 80 |
if __name__ == '__main__': |
내보내기 Unified diff