From 60f8c36c867de045979fa57d62d3f26d20ab9ca5 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Wed, 20 May 2020 17:46:48 +0800 Subject: [PATCH] fix eval_det_utils --- tools/eval_utils/eval_det_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/eval_utils/eval_det_utils.py b/tools/eval_utils/eval_det_utils.py index f0be714f..25cda208 100644 --- a/tools/eval_utils/eval_det_utils.py +++ b/tools/eval_utils/eval_det_utils.py @@ -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'](): -- GitLab