EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

easy ocr does not work in docker deployment

Open dghoffra opened this issue 8 months ago • 4 comments

Hi,

I am trying to deploy and use EasyOCR in a customized Docker container. When I run my PNG in the Docker container, the OCR only recognizes various empty strings like '', '', etc. Locally on my Mac M1, it works perfectly! I have already checked the library dependencies and am slowly getting desperate - does anyone have an idea which library could be causing this?

dghoffra avatar Apr 14 '25 10:04 dghoffra

Hi, I have the same problem. I was developing the project on macOS/Windows and everything worked well — it recognized characters very accurately. But when I tried to package it into Docker, EasyOCR started recognizing only a few words from an image full of text (I had tested it on macOS where it was able to extract a lot of text, but after setting it up in Docker, it recognized only a few words).

tyshchenko-dev avatar Apr 16 '25 08:04 tyshchenko-dev

Hi,

I am trying to deploy and use EasyOCR in a customized Docker container. When I run my PNG in the Docker container, the OCR only recognizes various empty strings like '', '', etc. Locally on my Mac M1, it works perfectly! I have already checked the library dependencies and am slowly getting desperate - does anyone have an idea which library could be causing this?

It turns out that if you run the same Docker configuration on Windows, EasyOCR works perfectly. But if you run it on macOS, for some reason it only extracts a single line. I suspect that my Mac has limited resources, which aren’t enough for the container to run properly.

tyshchenko-dev avatar Apr 16 '25 19:04 tyshchenko-dev

I can also confirm the same problem on macOS with M1. Sometimes only a few rows are returned. And sometimes some trash like "L=LELELELELELELEEIEIE=I GLELELELELELE" (see attachments)

image.jpeg

result.txt

I double checked: -Python version and all dependencies -Base docker image (tried different) -Downloading language models in EasyOCR -Resources allocated for the Docker container -GPU & CPU-only modes

KopachevskiiYuriy avatar Apr 23 '25 00:04 KopachevskiiYuriy

I'm having the same issue. Just like you with the LELELE, etc. Has anyone found a solution?

Update: setting quantize to False seems to do it for me

lou-roboflow avatar Sep 24 '25 20:09 lou-roboflow