-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Failed to dectet OS #526
Comments
I am encountering this too, but with Firefox 91. |
Same issue for me on chrome and firefox. Current version of tesseract.js, detect method does not work. Also, it fails no matter the source. Video, canvas, image and base64 all fail. |
I am unable to reproduce this issue (I ran the code snippet above and it worked for me), and the image linked above is dead. For anybody with this issue, please clarify whether the demo site runs for you. That should help us figure out whether the issue stems from the particulars of your browser/system or how you are deploying tesseract.js. |
@JobberRT @munsterlander I looked more into this, and believe I understand the issue. In the same way that Tesseract does not always detect text, it does not always detect script/orientation. When running on an image with only a couple words, it will not detect script/orientation, and tesseract.js throws an error. The fact that Tesseract does not recognize script/orientation on such images is outside of the scope of this project (as we do not edit the Tesseract engine). However, throwing an error when this happens does not seem like the correct behavior. Presumably tesseract.js should simply return a null value rather than throwing an exception (similar to if you run |
I edited so |
@Balearica Thanks! I will look into #662 and check it! |
See #662 for explanation of Tesseract.js Version 4 changes. List below is auto-generated from commits. * Added image preprocessing functions (rotate + save images) * Updated createWorker to be async * Reworked createWorker to be async and throw errors per #654 * Reworked createWorker to be async and throw errors per #654 * Edited detect to return null when detection fails rather than throwing error per #526 * Updated types per #606 and #580 (#663) (#664) * Removed unused files * Added savePDF option to recognize per #488; cleaned up code for linter * Updated download-pdf example for node to use new savePDF option * Added OutputFormats option/interface for setting output * Allowed for Tesseract parameters to be set through recognition options per #665 * Updated docs * Edited loadLanguage to no longer overwrite cache with data from cache per #666 * Added interface for setting 'init only' options per #613 * Wrapped caching in try block per #609 * Fixed unit tests * Updated setImage to resolve memory leak per #678 * Added debug output option per #681 * Fixed bug with saving images per #588 * Updated examples * Updated readme and Tesseract.js-core version
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Using Pure JS+HTML like this:
Expected behavior
Console log "Failed to dectet OS"
Screenshots
Desktop (please complete the following information):
Additional context
Source PNG file URL: http://cn8.frp.cool:12385/upload/1616768763_377_123.png
The text was updated successfully, but these errors were encountered: