EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

Reducing size of dependencies for portable use

Open BarryJRowe opened this issue 3 years ago • 0 comments

For context, I've made a video game translation app that takes a screenshot of the currently selected window, sends it to a server, and then displays the image in the app window with the translated text overwritten on it. Currently, there is some support for doing the OCR locally instead so the translations can be done faster and cheaper (using tesseract, which as you probably know is kind of terrible), as well as support user-made translation packages (the biggest hurdle for the user experience of making these has been the OCR aspect).

I've been looking for a better solution for doing things locally, and EasyOCR has had the best results so far in terms of accuracy and speed, but there's a big issue in terms of the size of the dependencies needed. Models are one thing (those can be downloaded based on what the user whats to read and translate), but using pyinstaller to create an exe results in several gigabytes of dependencies being included. By the looks of it, there seems to be 2.7gb just for the torch/lib folder. I still haven't been able to get the full installation working yet, but asking users to download and run a multiple gigabyte application while also running a game seems like it's asking a bit much.

Are there any solutions to keeping the size down? Like converting the models to tensorflow lite, or configurations that would restrict the cuda versions supported?

BarryJRowe avatar Jun 03 '22 02:06 BarryJRowe