This commit is contained in:
Your Name
2026-08-03 10:52:51 +08:00
parent 5ac803f7a6
commit 1048b9ba29
29 changed files with 436 additions and 597 deletions
+9 -1
View File
@@ -131,7 +131,15 @@ class NameReader:
try:
from rapidocr_onnxruntime import RapidOCR
self._engine = RapidOCR()
try:
# onnxruntime 默认按核数开满线程池且空转抢 CPU。识别的
# 都是几十像素高的小裁片,两个线程绰绰有余;不限的话
# 低配机每轮轮询都会被 OCR 抖一下。
self._engine = RapidOCR(
intra_op_num_threads=2, inter_op_num_threads=1
)
except Exception:
self._engine = RapidOCR()
except Exception as exc:
self._engine_failed = True
print(f" [身份] OCR 引擎不可用,无法读取会话昵称: {exc}")