I am trying to use Tesseract.js using nodejs but it is really slow for complex pictures, can even be even minutes ( like taken by phone camera ). Actually, I need the library for self-usage meaning, I develop something that I will only use, I downloaded Tesseract-OCR v5 I think, to my computer, it was really fast but the results were much worse than the Tesseract.js, howcome?
I am using the Tesseract.js like that:
const { createWorker } = require("tesseract.js");
const worker = createWorker({
logger: (m) => console.log(m),
});
await worker.load();
await worker.loadLanguage("heb");
await worker.loadLanguage("eng");
await worker.initialize("heb+eng");
worker.recognize(`./${file}`)
.then((text) => console.log(text))
.catch((err) => console.log(err));
})
)
and the logger prints this ( as it is very slow i guess the progress is minor ):
{workerId: 'Worker-0-81381', jobId: 'Job-0-4395c', status: 'recognizing text', progress: 0}
{workerId: 'Worker-0-81381', jobId: 'Job-0-4395c', status: 'recognizing text', progress: 0.014285714285714285}
{workerId: 'Worker-0-81381', jobId: 'Job-0-4395c', status: 'recognizing text', progress: 0.02857142857142857}
{workerId: 'Worker-0-81381', jobId: 'Job-0-4395c', status: 'recognizing text', progress: 0.04285714285714286}
Thank you very much!