tesseract-ocr / tesstrain

Train Tesseract LSTM with make
Apache License 2.0
620 stars 181 forks source link

Couldn't load any language! #204

Closed derm1ch1 closed 3 years ago

derm1ch1 commented 3 years ago

Hey, I've trained my custom-language with the given script and it worked out-of-the-box like a charm! :-)

Anyway I face a crucial problem: I got my .traineddata file as an output from training. I copied (just) this file into my tessdata folder. When I hit the command tesseract --list-lang it prints all languages, including my custom lang.traineddata file.

But when I try to use my custom trained language as in tesseract img.jpg -l lang stdout it fails and says: couldn't load any language!

All other languages, like eng, deu etc. work fine! It's just my custom trained language. The Tesseract version I'm using is 4.0.0-beta1 - should I may update my Tesseract?

What am I doing wrong? :-( I would love any answers, suggestions and ideas, since I'm pretty new (24h in) to Tesseract and don't find any working answers on the internet. Thank you so much and have a great day!

Michael

Shreeshrii commented 3 years ago

Please update tesseract and try.

stweil commented 3 years ago

tesseract img.jpg -l lang stdout

That's the wrong order. Please try tesseract img.jpg stdout -l lang.

derm1ch1 commented 3 years ago

Hey guys, thanks for the fast replies!! I was busy the whole day updating tesseract. Originally I used sudo apt-get install tesseract-ocr which results in version 4.0.0-beta1 - and there seems no way to update it?

--> So i cloned the github repository and installed it with the given make files.

Result: I now use tesseract 4.1.1 and the correct syntax tesseract img.jpg stdout -l lang. tesseract --version --> 4.1.1 tesseract --list-langs --> eng, custom

It still doesn't work - but I get a new error:

tesseract (legacy) engine requested but components are not present
Failed loading language 'custom'
Tesseract couldn't load any languages!
Could not initialize tesseract.

Do you guys have any idea what's going on and why?

Thanks a lot and have a good day!!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.