未验证 提交 0d16606e 编写于 作者: D dyning 提交者: GitHub

Merge pull request #80 from LDOUBLEV/fixocr

Fixocr
...@@ -34,6 +34,7 @@ import json ...@@ -34,6 +34,7 @@ import json
from copy import deepcopy from copy import deepcopy
import cv2 import cv2
from ppocr.data.reader_main import reader_main from ppocr.data.reader_main import reader_main
import os
def cal_det_res(exe, config, eval_info_dict): def cal_det_res(exe, config, eval_info_dict):
...@@ -43,6 +44,8 @@ def cal_det_res(exe, config, eval_info_dict): ...@@ -43,6 +44,8 @@ def cal_det_res(exe, config, eval_info_dict):
postprocess_params.update(global_params) postprocess_params.update(global_params)
postprocess = create_module(postprocess_params['function']) \ postprocess = create_module(postprocess_params['function']) \
(params=postprocess_params) (params=postprocess_params)
if not os.path.exists(os.path.dirname(save_res_path)):
os.makedirs(os.path.dirname(save_res_path))
with open(save_res_path, "wb") as fout: with open(save_res_path, "wb") as fout:
tackling_num = 0 tackling_num = 0
for data in eval_info_dict['reader'](): for data in eval_info_dict['reader']():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册