From 389c234b34813b280acf0073f28d266cd946c601 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Sun, 1 Oct 2023 15:55:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3paddle=5Frecog=E5=88=86?= =?UTF-8?q?=E6=95=B0=E8=AE=A1=E7=AE=97?= 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 61755ef79..d133353cb 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 += 3 if c in recog_text else 0 + score += 1 if c in recog_text else 0 if score > best_score: best = x best_score = score - if best_score > len(best) * 2: + if best_score > 0: logger.debug(f"{recog_text} --?--> {best}") return best return None