1
0
mirror of https://github.com/sui-feng-cb/AzurLaneAutoScript1.git synced 2026-08-13 19:14:29 +08:00

Opt: use ONNX model converted from MXNet for faster OCR with MXNet fallback

This commit is contained in:
positnuec
2026-08-11 03:12:42 +08:00
parent 51f11c541c
commit 11d6de3138
27 changed files with 809 additions and 23 deletions

View File

@@ -8,8 +8,9 @@ inflection
jellyfish==0.11.2
lz4
mxnet==1.6.0
numpy
numpy==1.21.6
onepush==1.4.0
onnxruntime==1.14.1
pillow
prettytable==2.2.1
psutil==5.9.3

View File

@@ -38,6 +38,8 @@ class ConfigModel:
StartOcrServer: bool = False
OcrServerPort: int = 22268
OcrClientAddress: str = "127.0.0.1:22268"
OcrBackend: str = "onnx"
IntraOpThreads: Optional[int] = None
# Update
EnableReload: bool = True

View File

@@ -79,6 +79,14 @@ 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
# [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
# [Default] null
IntraOpThreads: null
Update:
# Use auto update and builtin updater feature

View File

@@ -35,6 +35,8 @@ class ConfigModel:
StartOcrServer: bool = False
OcrServerPort: int = 22268
OcrClientAddress: str = "127.0.0.1:22268"
OcrBackend: str = "onnx"
IntraOpThreads: Optional[int] = None
# Update
EnableReload: bool = True

View File

@@ -1,5 +1,5 @@
# Image processing
numpy==1.16.6
numpy==1.21.6
scipy==1.4.1
pillow
opencv-python-headless
@@ -34,6 +34,7 @@ pypresence==4.2.1
# Ocr
cnocr==1.2.2
mxnet==1.6.0
onnxruntime==1.14.1
# Webui
pywebio==1.6.2

View File

@@ -1,5 +1,5 @@
# Image processing
numpy==1.17.4
numpy==1.21.6
scipy==1.4.1
pillow==9.5.0
opencv-python-headless==4.7.0.72
@@ -34,6 +34,7 @@ pypresence==4.2.1
# Ocr
cnocr==1.2.2
mxnet==1.6.0
onnxruntime==1.14.1
# Webui
pywebio==1.6.2

View File

@@ -44,7 +44,7 @@ def headless_requirements_generate(requirements_in='requirements-in.txt'):
'aiofiles': '23.1.0',
'inflection': '0.5.1',
'lz4': '4.3.2',
'numpy': '1.17.4',
'numpy': '1.21.6',
# 'onepush': '1.2.0',
'opencv-python': {
'name': 'opencv-python-headless',

View File

@@ -79,6 +79,14 @@ 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
# [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
# [Default] null
IntraOpThreads: null
Update:
# Use auto update and builtin updater feature