-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSD not working again with --psm 0 after latest 20181030 binary release #2062
Comments
This could be related to the changed handling of the alpha channel in PNG images: the latest Tesseract code replaces the alpha channel by white. @CanadianHusky, could you please try both versions with the same image in other formats (for example JPEG or TIFF) or with a PNG without alpha channel? |
Hello, @stweil |
Hello, I see a new pre-compiled release at https://digi.bib.uni-mannheim.de/tesseract/ for tesseract-ocr-w64-setup-v4.1.0.20190314.exe and tested that release against the issue mentioned above. The result on the input image is still incorrect. thank you |
That binary is based on latest Tesseract sources (Git master). |
@CanadianHusky: you can copy and paste terminal output by mouse select (with left button, and if you then click with right in terminal you have selection in clipboard) - it is more useful than screenshots. I made test with the latest code (5.0.0-alpha-50-g3f4dc) and best tessdata:
But if I skip language specification (eng should be used anyway) I got different result:
Detection of orientation is correct, but script is wrong. This is quiet strange that specification of eng language is cause different result... |
And using
Seems like LSTM model is not able to detect correctly orientation on this kind of images (Too few characters), but legacy is working fine:
|
More details, that can bring some light how it works: If there is not language specification - only
I am not sure if we can/want do something with this. |
As soon as I see a stable binary release that I can test, I will try those suggested command line options. |
If my observation is correct you do not need to wait for stable release: just use tessdata repository for OSD. |
@zdenop, it is normal that only My tests with latest Tesseract code all give the right orientation as long as I do not add |
So what is the status of this issue? Can it be closed? |
@CanadianHusky, do you still have that problem? |
Orientation detection still has problems for me. Here are my test results, after having adjusted the command line as recommended by @stweil Test environment : all 3 input images are 0 degrees, but get detected with incorrected result. Am I still doing something wrong in the command line ? also worth noting, adding -l eng (or -l deu) changes the orientation detection result, still to an incorrect result, but very high confidence. |
It might be related to this OSD related issue. |
I tested the input2 image. I got correct result with:
console:
input2.osd
I'm not going to bother testing more images. |
Thank you for revisiting this issue. In the meantime I have discovered the source of the inconsistency. Now observe these tests, only
These are the files in tessdata and clearly the source of the issue for me is that the original file installed with the binary distribution does not give the expected result. File eng_22917 was downloaded seperately from the traineddata repository I would be interested to know what size your eng.traineddata file is and where it is from. The source for my trained data files are as follows: https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata https://github.com/tesseract-ocr/tessdata_fast/blob/master/eng.traineddata https://github.com/tesseract-ocr/tessdata_best/blob/master/eng.traineddata It took me very long time to understand and figure out this issue. I hope this information helps someone else. I have closed the issue. I suppose the question now becomes if it makes sense to add a note to the binary distribution or elsewhere in the release notes from @stweil that the included default traineddata file is the fast integer model, which is totally fine for most users when all thay want to do is regular OCR. For anyone that is interested in OSD only like me, the traineddata files that I linked to must be used as far as I see from my tests. |
I used eng.traindata from the tessdata repo. https://github.com/tesseract-ocr/tessdata/blob/d87b3cbc7555/eng.traineddata Size: 24.5 MB (24,530,234 bytes |
Environment
Binary release clean install from
https://github.com/UB-Mannheim/tesseract/wiki
https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-v4.0.0.20181030.exe
Current Behavior:
orientation is detected wrong in supplied file with shown command line
WRONG Result :
Expected Behavior:
compare the same input against 4.0.0-rc1
CORRECT Result :
the orientation confidence value based on tests on thousdands of files in rc1 version is extremely accurate and makes sense. It is used as a threshold if the result can be trusted or not
the result from 20181030 release is horribly mistaken
Input Image :
Suggested Fix:
invesigate what lead to regression in OSD code
thank you kindly
The text was updated successfully, but these errors were encountered: