Forums

Pytesseract image to data works extremely slow

Hello guys!

I'm using pytesseract to extract data from the image. The method I call is image_to_data with config '-l pol --oem 3 --psm 4'. I have the pol.traineddata uploaded next to my Flask app.

When I run my app on my local machine, the image_to_data method call takes 3-5 seconds to complete. But when I run the same method with the same image on the PythonAnywhere server, the method call takes 5 - 10 minutes.

Is there sth I do wrong? Can the performance of pytesseract on PythonAnywhere server be improved somehow?

Thanks!

Tesseract is very CPU intensive and, in a free account, you will probably use all of the CPU time that you have available. That would mean that you'd be in the tarpit and your processes would run more slowly.

Alright, thanks for the information