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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user