From 5abc3a7f13fcb6ce52d10e4ae158d055fbf02c60 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Fri, 13 Oct 2023 17:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9C=E7=94=A8PaddleOCR=E7=8C=9C=E5=B9=B2?= =?UTF-8?q?=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 2 -- arknights_mower/utils/character_recognize.py | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index 9c3565e3b..9a42f87d8 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -948,8 +948,6 @@ def read_screen(self, img, type="mood", limit=24, cord=None): name = ocr_error[ret] logger.debug(f"{ret} =====> {name}") return name - if name := character_recognize.paddle_guess_agent(ret): - return name return character_recognize.agent_name(img, self.recog.h) else: return ret diff --git a/arknights_mower/utils/character_recognize.py b/arknights_mower/utils/character_recognize.py index 7fd1dd0be..777ede1fe 100644 --- a/arknights_mower/utils/character_recognize.py +++ b/arknights_mower/utils/character_recognize.py @@ -158,12 +158,11 @@ def paddle_recog(__img): if r[0] in agent_list: op_name = r[0] return op_name + for r in res: if r[0] in ocr_error: op_name = ocr_error[r[0]] logger.debug(f"{r[0]} =====> {op_name}") return op_name - recog_text = res[0][0] - return paddle_guess_agent(recog_text) return None