kha-white / manga-ocr

Optical character recognition for Japanese text, with the main focus being Japanese manga
Apache License 2.0
1.76k stars 89 forks source link

Including manga ocr in android app? #83

Open clausagerskov opened 2 weeks ago

clausagerskov commented 2 weeks ago

How feasible would it be to use manga ocr to power a manga reading app? Would a typical smartphone be able to run ocr on a line of text in a reasonable amount of time? How big would the installation be? And would it even be technically possible to include it in the app code?

Mar2ck commented 5 days ago

I got manga-ocr running on Android via termux and it took about 3-4 seconds per image on a Snapdragon 8+ Gen 1. That's a significant delay but not unuseably slow.

Shipping PyTorch in an app is very impractical though, realistically you would port to ONNX and run the model on NPU via NNAPI to speed up inference and reduce battery consumption. Also the model itself is 444 MB so quantizing to int8/int4 would be a must to keep storage requirements down.