Skip to content

Commit

Permalink
fix eval_det_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
LDOUBLEV committed May 20, 2020
1 parent 2bd6323 commit 60f8c36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/eval_utils/eval_det_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from copy import deepcopy
import cv2
from ppocr.data.reader_main import reader_main
import os


def cal_det_res(exe, config, eval_info_dict):
Expand All @@ -43,6 +44,8 @@ def cal_det_res(exe, config, eval_info_dict):
postprocess_params.update(global_params)
postprocess = create_module(postprocess_params['function']) \
(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:
tackling_num = 0
for data in eval_info_dict['reader']():
Expand Down

0 comments on commit 60f8c36

Please sign in to comment.