Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awesome, but slow #2

Open
Seminko opened this issue Jul 13, 2023 · 2 comments
Open

Awesome, but slow #2

Seminko opened this issue Jul 13, 2023 · 2 comments

Comments

@Seminko
Copy link

Seminko commented Jul 13, 2023

Script works great. I can imagine non-ingame related use-cases, ie writing articles, discord bot etc.

Unfortunately it's quite slow which renders it unusable for non-bot ingame purposes, ie checking if gear has desired affixes when playing "manually".

Tested it briefly and got:
7.3s with find-tooltip True
16.75s with find-tooltip False

Nice work either way.

@mxtsdev
Copy link
Owner

mxtsdev commented Jul 18, 2023

I've updated the code in the repository to use MKLDNN if you are running on the CPU. With it enabled, I get OCR times between 0.3-0.5 seconds and a total processing time of 0.6-0.8 seconds on an AMD Ryzen 9 3900X (on 1080p screenshots).

Ideally, you would want to run PaddleOCR on the GPU. On a GeForce RTX 3070, I achieve OCR times around 0.1 seconds and a total processing time of 0.4 seconds (on 1080p screenshots). When using the GPU, there will be a warmup of a few seconds on the first image processed.

You need to install the correct version of PaddlePaddle depending on your environment. Please refer to this link:
https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/en/install/pip/windows-pip_en.html#old-version-anchor-3-INSTALLATION

I have used the versions below.

CPU
pip install paddlepaddle==2.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

GPU/CUDA 10.2
pip install paddlepaddle-gpu==2.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

GPU/CUDA 11.7
pip install paddlepaddle-gpu==2.5.0 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html

@Seminko
Copy link
Author

Seminko commented Jul 18, 2023

0.1s is impressive indeed!
Unfortunately, my PC is not that decked out.
Once I have a bit more time I will test the new code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants