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

Character level recognition gives the same results as the word level recognition. #877

Closed
Kishlay-notabot opened this issue Jan 24, 2024 · 3 comments

Comments

@Kishlay-notabot
Copy link

Tesseract.js version (version number for npm/GitHub release, or specific commit for repo)
Latest release version 5.0.4

Describe the bug
A clear and concise description of what the bug is.

Running Tesseract.js code in 2 different PSM modes gives the same output.
Is tesseract configured to give word level outputs only?
Am I guessing it right that PSMs just refine the recognition scope, but do not affect the output because it will always will be in words?
Running in SINGLE_CHAR and PSM_SINGLE_WORD gives the same output from the same sample.
I want to sort the result character by character and in order to do that, I want the bbox data of each character detected to be extracted, and used further. Is this possible?

Device Version:

  • OS + Version: [e.g. iOS8.1, Windows 10]
    Windows 11
  • Browser [e.g. chrome, safari] or Node version [e.g. Node v18]
    Edge
@Balearica
Copy link
Collaborator

Page segmentation mode (PSM) has no impact on the format or level of granularity of the output. Running with PSM SINGLE_WORD tells the Tesseract "I believe the input image contains a single word," and running with SINGLE_CHAR tells Tesseract "I believe the input image contains a single character."

If you want more granular output with character-level bounding boxes, look at the blocks output format.

@Kishlay-notabot
Copy link
Author

Thankyou for giving an insight, will close after experimenting

o7

@Kishlay-notabot
Copy link
Author

@Balearica While working on my project I have created some good beginner friendly and advanced programs which could be added in the example docs, shall I add them and open a pull request?
Thankyou

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