diff --git a/deepdoc/vision/ocr.py b/deepdoc/vision/ocr.py index d602da06fef..317b671fdd4 100644 --- a/deepdoc/vision/ocr.py +++ b/deepdoc/vision/ocr.py @@ -23,7 +23,6 @@ import onnxruntime as ort from .postprocess import build_post_process -from rag.settings import cron_logger def transform(data, ops=None): @@ -566,9 +565,6 @@ def detect(self, img): end = time.time() time_dict['all'] = end - start return None, None, time_dict - else: - cron_logger.debug("dt_boxes num : {}, elapsed : {}".format( - len(dt_boxes), elapse)) return zip(self.sorted_boxes(dt_boxes), [ ("", 0) for _ in range(len(dt_boxes))]) @@ -597,9 +593,7 @@ def __call__(self, img, cls=True): end = time.time() time_dict['all'] = end - start return None, None, time_dict - else: - cron_logger.debug("dt_boxes num : {}, elapsed : {}".format( - len(dt_boxes), elapse)) + img_crop_list = [] dt_boxes = self.sorted_boxes(dt_boxes) @@ -612,8 +606,6 @@ def __call__(self, img, cls=True): rec_res, elapse = self.text_recognizer(img_crop_list) time_dict['rec'] = elapse - cron_logger.debug("rec_res num : {}, elapsed : {}".format( - len(rec_res), elapse)) filter_boxes, filter_rec_res = [], [] for box, rec_result in zip(dt_boxes, rec_res): diff --git a/deepdoc/vision/recognizer.py b/deepdoc/vision/recognizer.py index 1ca7c4478ff..7fd624e2d3b 100644 --- a/deepdoc/vision/recognizer.py +++ b/deepdoc/vision/recognizer.py @@ -19,7 +19,6 @@ from api.utils.file_utils import get_project_base_directory from .operators import * -from rag.settings import cron_logger class Recognizer(object): @@ -340,7 +339,6 @@ def postprocess(self, boxes, inputs, thr): if score < thr: continue if clsid >= len(self.label_list): - cron_logger.warning(f"bad category id") continue bb.append({ "type": self.label_list[clsid].lower(),