fix eval_det_utils

This commit is contained in:
LDOUBLEV 2020-05-20 17:46:48 +08:00
parent 2bd6323642
commit 60f8c36c86
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,7 @@ import json
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):
@ -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']():