1
0
mirror of https://github.com/sui-feng-cb/AzurLaneAutoScript1.git synced 2026-08-19 04:50:43 +08:00

Feat: adopt upstream standalone ONNX OCR backend

Adopt the standalone OnnxOcr from upstream PR #5893 (381bb8d05,
by Horizon101011), which vendors cnocr's pure-Python pipeline so
the ONNX path loads no mxnet at runtime. Backend is selected via
deploy config, keeping onnxruntime a standard dependency and onnx
the default.

Co-authored-by: Horizon101011 <43370844+Horizon101011@users.noreply.github.com>
This commit is contained in:
positnuec
2026-08-16 21:56:43 +08:00
parent b1100369f7
commit 239f252881
17 changed files with 338 additions and 166 deletions

View File

@@ -39,7 +39,7 @@ class ConfigModel:
OcrServerPort: int = 22268
OcrClientAddress: str = "127.0.0.1:22268"
OcrBackend: str = "onnx"
IntraOpThreads: Optional[int] = None
OnnxIntraOpThreads: Optional[int] = None
# Update
EnableReload: bool = True

View File

@@ -65,7 +65,7 @@ Deploy:
InstallUiautomator2: true
Ocr:
# Run Ocr as a service, can reduce memory usage by not import mxnet everytime you start an alas instance
# Run Ocr as a service, can reduce memory usage by not import OCR dependencies everytime you start an alas instance
# Whether to use ocr server
# [Default] false
@@ -79,14 +79,13 @@ Deploy:
# Address of ocr server for alas instance to connect
# [Default] 127.0.0.1:22268
OcrClientAddress: 127.0.0.1:22268
# Use higher-performance backend for OCR instead of MXNet
# Available backends: onnx
# Backend used for OCR
# Available backends: mxnet, onnx
# [Default] onnx
OcrBackend: onnx
# Number of threads used for intra-op parallelism in the ONNX session
# Leave as default if you are unsure of the impact
# Number of threads used for intra-op parallelism in ONNX Runtime
# [Default] null
IntraOpThreads: null
OnnxIntraOpThreads: null
Update:
# Use auto update and builtin updater feature