Skip to content
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

Different ocr results with almost same image using lstm only single line mode #2

Open
shishaozheng opened this issue Dec 19, 2018 · 2 comments

Comments

@shishaozheng
Copy link

shishaozheng commented Dec 19, 2018

Hi, Thank you for update the ios lib to the tesseract 4.0.0 release version.
I try to use it for almost same images with following language and mode (official fast eng tessdata):

let tesseract:G8Tesseract = G8Tesseract(language: "eng", engineMode: G8OCREngineMode.lstmOnly) tesseract.pageSegmentationMode = .singleLine

I try three times, but the result is quite different, just first one is correct, the other two results is so confused.

image

image

image

@shishaozheng shishaozheng changed the title Different ocr result with almost same image using lstm only mode Different ocr results with almost same image using lstm only mode Dec 19, 2018
@shishaozheng shishaozheng changed the title Different ocr results with almost same image using lstm only mode Different ocr results with almost same image using lstm only single line mode Dec 19, 2018
@xwal
Copy link
Owner

xwal commented Dec 19, 2018

Hi, try to replace eng.traineddata with https://github.com/tesseract-ocr/tessdata/releases/tag/4.0.0, my repo is old version traineddata.

@shishaozheng
Copy link
Author

Thank you for replying, actually I already use the latest official tessdata.
I think the problem is related with the single line mode, because if I use the whole page as the input image instead of single line image which cropped with text line detection method implemented by myself, then change the engine mode from single line to block, the result seems good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants