SubhamTyagi/android-ocr

[FIXED] Help needed side loading trained data?

older-pack opened this issue ยท 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

Choose data type as "fast" in setting also.

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?

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

Thank you. That's great news. I really appreciate it ๐Ÿ˜„ ๐Ÿ‘

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. ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

I don't know why I didn't try the tessdata sub-directory before... ๐Ÿ™„ ๐Ÿ˜Š ๐Ÿฅด

So to summaries how I side loaded the traineddata:

Very easy.

Thanks for the great app. ๐Ÿ˜ƒ ๐Ÿ‘ ๐Ÿฆ