android-ocr icon indicating copy to clipboard operation
android-ocr copied to clipboard

[FIXED] Help needed side loading trained data?

Open older-pack opened this issue 4 years ago • 5 comments

Hi, internet access doesn't work on my device. So I can't directly download the trained data. But I can side load data.

I've read #29 and I can the see data goes in /storage/emulated/0/Android/data/io.github.subhamtyagi.ocr/files/best

As an example, I've downloaded the "Fast" english data from here https://github.com/tesseract-ocr/tessdata_fast/blob/master/eng.traineddata

And I copied that eng.traineddata to /storage/emulated/0/Android/data/io.github.subhamtyagi.ocr/files/fast But the app still doesn't see it!

Am I doing it correctly? I noticed another directory called .../fast/tesstata Should I put something in there too?

Any help on side loading would be much appreciated. Thanks

older-pack avatar May 24 '21 20:05 older-pack

Choose data type as "fast" in setting also.

SubhamTyagi avatar May 25 '21 07:05 SubhamTyagi

Thanks for the reply. I have selected "Fast" in the settings but the screen just stays black and a message "You are not connected to the internet" appears. I tried rebooting the device too, but it didn't help.

I'm definitely not a developer, but I have got adb installed. I don't suppose I could use it to do anything extra that might help?

older-pack avatar May 25 '21 16:05 older-pack

for convenience I will provide a option in Setting to locate previously downloaded training data.

SubhamTyagi avatar May 26 '21 16:05 SubhamTyagi

Thank you. That's great news. I really appreciate it :smile: :thumbsup:

older-pack avatar May 27 '21 11:05 older-pack

Hi I'd just like to report back that I managed to get this working.

Firstly I updated to the latest 3.0 version but I don't think that was the main fix.

I think the actual fix was simply to move the eng.traineddata into the sub-folder .../fast/tesstata that I mentioned in my first post.

Then I opened the OCR app. The app screen was all black as before. I didn't think it was working. But I hit the red icon in the bottom corner. This time instead of trying to go online to get the traineddata it asked what source to use (choice of two camera apps or file manager)

Once it had an image I could crop it. And presto it OCRed it very quickly.

This is just great. Very impressed. And all done offline. :thumbsup: :thumbsup: :thumbsup:

I don't know why I didn't try the tessdata sub-directory before... :roll_eyes: :blush: :woozy_face:

So to summaries how I side loaded the traineddata:

Very easy.

Thanks for the great app. :smiley: :thumbsup: :icecream:

older-pack avatar Feb 03 '22 10:02 older-pack