Comments (6)
Please describe when you've encountered this issue and how to replicate. Both issues you've linked state that this issue occurs when running a bash script to generate new training data, which is not something we support in Tesseract.js. Additionally, these issues indicate the problem was already solved in early 2021.
from tesseract.js.
I use tesseract.min.js, in GTA5 third party application called FiveM, to detect some text on the screen.
What I can track down with my knowledge was that it happens when you enter an base 64 image string like attached.
base64imagestring.txt
from tesseract.js.
Using the base 64 string you provided, I was able to replicate Tesseract.js printing this message.
Image too small to scale!! (2x36 vs min width of 3)
Line cannot be recognized!!
That being said, I do not believe this message being printed indicates a bug in Tesseract.js. Tesseract.js did not crash and recognition appeared to run as expected. As the message itself was produced by Tesseract (not Tesseract.js-specific code), editing the underlying code is outside of the scope of this project. Tesseract.js is intended to port Tesseract to run with JavaScript--we do not make changes to the Tesseract recognition engine. If you believe you found a bug with Tesseract, you should replicate using the main project and then report there.
If the core issue is simply that you are annoyed by messages from Tesseract being printed to the console, you can change this behavior by setting debug: true
in the recognition output options. With this option, the text will instead be reported in the output object rather than printed to console.
worker.recognize(img1, undefined, {debug: true})
from tesseract.js.
Thank you very much, but I have one last question. If I set the debug to true or false it doesn't change anything (it still spammed my console).
Tesseract.recognize(event.data.data, 'eng', {debug: true}).then(({ data: { text } }) => {do something});
I also tried two more unnatural method, but they didn't work for me either.
Tesseract.recognize(event.data.data, 'eng', {logger: m => {}}).then(({ data: { text } }) => {do something});
Tesseract.recognize(event.data.data, 'eng', {errorHandler: m => {}}).then(({ data: { text } }) => {do something});
Do you have another tip for me?
from tesseract.js.
@Melmacker Tesseract.recognize
does not contain an output
argument, so adding {debug: true}
does not do anything. The worker.recognize
method contains an output
argument that you would set to {debug: true}
.
Tesseract.recognize
is an extremely simple function that exists primarily for the sake of new users experimenting with Tesseract.js. To have full control and the best performance, you need to manage the worker objects directly. This is explained in the intro guide.
from tesseract.js.
Thank you verry much. Now I got it 😅
Keep up the good work.
from tesseract.js.
Related Issues (20)
- Missing "languages" attributes on default export HOT 1
- Switch from CommonJS to ESM modules HOT 1
- setImage is re-run unnecessarily when rotateAuto is enabled
- `debug` output missing from types HOT 1
- Custom traindata do not work HOT 2
- possibility to capture stderr HOT 3
- JSDelivr CDN not accessible in China HOT 8
- Large images cause excessive memory usage
- Worker stuck on "loading language traineddata" HOT 3
- Updated types to infer output formats
- Inference of Chinese handwritten characters is bad HOT 3
- Add line size metrics (ascender, descender, size) to `line` objects in `blocks` output HOT 1
- Font attributes incorrect even when font is properly identified (`is_italic`, `is_serif`, etc.) HOT 1
- Focusing area HOT 1
- Multiple issues: Discussion
- Disable non-text output formats by default
- Tesseract - Running in Browser Console HOT 1
- Execution `worker.recognize` repeatedly causes "Out of Memory" error in JSFiddle HOT 5
- Error: Network error while fetching HOT 1
- how to use installed tessercat lib on windows for tesseract.js? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tesseract.js.