小编rGu*_*Gun的帖子

Tesseract:CPU使用率高,速度慢,只有在并行运行多个进程时

问题

pytesseract.image_to_string()当我通过 supervisordd 运行脚本时花费了太多时间,但是当直接在 shell 中运行时几乎立即执行(在同一台服务器上并与主管脚本同时运行)。
除了花费太多时间之外,进程还显示出高 CPU 使用率。

通过采取时间pytesseract.image_to_string()时,通过Supervisord运行:30岁〜
采取的时间pytesseract.image_to_string()时,通过击运行:0.1S

只有在有很多进程pytesseract.image_to_string()、正在执行、通过 supervisord 运行(大约 22 个实例)时才会出现此问题。如果我减少实例的数量(大约 10 个),通过 supervisord 执行的脚本也能顺利运行。

系统信息

操作系统:Ubuntu 18.04.2 LTS(仿生)
Supervisord:版本 3.3.1
Tesseract:版本 4.0.0-beta.1
Python:版本 3.6
PyTesseract:版本 0.2.5

ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 127357
max locked memory       (kbytes, -l) 16384
max memory size         (kbytes, -m) unlimited
open files …
Run Code Online (Sandbox Code Playgroud)

ocr tesseract

6
推荐指数
1
解决办法
7507
查看次数

标签 统计

ocr ×1

tesseract ×1