From 3e18f2f8d636a0cac1c5e9f28265a3a70c19df5a Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Sun, 1 Oct 2023 09:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpaddle=5Frecog=E8=AF=84?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/utils/character_recognize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arknights_mower/utils/character_recognize.py b/arknights_mower/utils/character_recognize.py index c2f9d3fa0..61755ef79 100644 --- a/arknights_mower/utils/character_recognize.py +++ b/arknights_mower/utils/character_recognize.py @@ -145,11 +145,11 @@ def paddle_recog(__img): for x in agent_sorted: score = -abs(len(x) - len(recog_text)) for c in set(x): - score += 2 if c in recog_text else 0 + score += 3 if c in recog_text else 0 if score > best_score: best = x best_score = score - if best_score > len(best): + if best_score > len(best) * 2: logger.debug(f"{recog_text} --?--> {best}") return best return None