Skip to content

Commit 124cfc7

Browse files
committed
chore: 识别干员名不再做归一化处理
1 parent 152dddf commit 124cfc7

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

aao/core/avatar.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import json
1212
import time
13-
import unicodedata
1413
from pathlib import Path
1514
from typing import TYPE_CHECKING
1615

@@ -49,15 +48,12 @@ def _get_char_id(oper_name: str) -> str:
4948

5049

5150
def _normalize_name(name: str) -> str:
52-
"""归一化干员名用于匹配(OCR 结果可能与原名有字形差异)
51+
"""干员名匹配前的最小清理
5352
54-
- NFKC:上标 ²→2、Ⅲ→III、全角字母数字→半角。
55-
- 去除空白
53+
PP-OCRv6 rec 模型足够强,不再做 NFKC/字形替换/大小写折叠,避免把
54+
特殊干员名(如 GALLUS²)改写成与资源名不一致的形式
5655
"""
57-
if not name:
58-
return ""
59-
name = unicodedata.normalize("NFKC", name)
60-
return name.replace(" ", "").replace(" ", "")
56+
return name.strip() if name else ""
6157

6258

6359
def detect_slots(
@@ -208,6 +204,7 @@ def _ocr_oper_name(context: Context, detail_img: np.ndarray) -> str | None:
208204
"recognition": "OCR",
209205
"roi": _NAME_ROI,
210206
"threshold": 0.3,
207+
"order_by": "Area",
211208
}
212209
},
213210
)

0 commit comments

Comments
 (0)