JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
https://www.jaided.ai
Apache License 2.0
24.34k stars 3.15k forks source link

easyOCR still uses GPU although not asked #854

Open ozancaglayan opened 2 years ago

ozancaglayan commented 2 years ago

Hi,

When I create the reader object with gpu=False, it doesnt directly use the GPU device, but upon calling readtext, it captures the first available GPU device apparently uses it according to nvidia-smi. I verified that its not detect() that triggers the GPU use so its probably the recognizer pipeline. I didnt have time to debug further.

rkcosmos commented 2 years ago

thanks, we will investigate this.

Kris-Duszak commented 2 years ago

Hello, I am also seeing the same issue and would like to run only on CPU. Is there any update on this?

rkcosmos commented 2 years ago

We found the problem. Patch is coming soon.

Kris-Duszak commented 2 years ago

I've set pin_memory=False in get_text function for recognizer.py and this seems to work. Is this all that is needed?