Skip to content

Commit

Permalink
修正paddle_recog分数计算
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Oct 1, 2023
1 parent deb5b15 commit 389c234
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arknights_mower/utils/character_recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 389c234

Please sign in to comment.