ail-framework icon indicating copy to clipboard operation
ail-framework copied to clipboard

OcrExtractor consuming a lot of RAM and not using GPU

Open davidcbbc opened this issue 9 months ago • 1 comments

Hey!

After using AIL for a while I noticed that the OcrExtractor module that uses easyocr is consuming a lot of ram. Therefore, I updated my AIL machine with a GPU and restarted the AIL process. Nonetheless, it seems the module is not using the GPU by default and still consuming a lot of RAM , as seen in the next picture:

Image

Also you can see on the following picture that the GPU is not being used by the OcrExtractor module:

Image

After searching a little I've found this link where it states that the easyocr Reader function in https://github.com/ail-project/ail-framework/blob/master/bin/lib/objects/Ocrs.py should be called with gpu=True to use the GPU accelaration - any thoughts?

davidcbbc avatar Mar 06 '25 17:03 davidcbbc

That's indeed correct. You need to add the gpu=True when instantiating easyOCR. We might need indeed to add it as a configuration parameter for the next release to make it more easy to enable.

adulau avatar Mar 06 '25 21:03 adulau