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

Font attributes incorrect even when font is properly identified (is_italic, is_serif, etc.) #907

Open
Balearica opened this issue Mar 31, 2024 · 1 comment
Milestone

Comments

@Balearica
Copy link
Collaborator

The blocks output format includes various font attributes on the word level, including is_italic and is_serif. These do not appear to be functioning properly, and seem to always return false, even when using the Legacy model and when font identification worked correctly.

For example, when running recognition with the Legacy engine on the image below, the font is correctly recognized as an italic/serif font (Times_New_Roman_Italic). However, despite this, the is_italic and is_serif attributes are both false.
italic_example_1

If this is an issue with Tesseract.js/Tesseract.js-core we should fix. If it is an issue on the Tesseract side, where the information is always incorrect, these should be removed from our output to avoid confusion (in the next major version).

Note that this is distinct from general accuracy issues with Tesseract font recognition, or the fact that it only runs on Legacy, which are outside of the scope of this repo. This issue is specific to cases where Tesseract correctly identifies the font but is still returning the wrong font attributes.

@Balearica
Copy link
Collaborator Author

Given that the amount of information retrieved for blocks was found to inflate runtime (see #916), I am now planning to simply remove these properties in v6.

Even if this feature worked correctly (in that it accurately reported what Tesseract finds), it would still only be useful in extremely niche circumstances, if ever. Tesseract LSTM (the default) does not perform font detection at all, and Tesseract Legacy performs poorly with font identification, so this information would either be missing or inaccurate even if this bug was fixed.

@Balearica Balearica added this to the v6.0 milestone Apr 16, 2024
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

1 participant