B
B
bleach_thresh2021-08-24 20:46:17
Node.js
bleach_thresh, 2021-08-24 20:46:17

How to improve tesseract.js digit recognition?

const { createWorker } = require('tesseract.js')
 
const worker = createWorker({
  logger: m => console.log(m)
});
 
(async () => {
  await worker.load();
  await worker.loadLanguage('rus');
  await worker.initialize('rus');
  const { data: { text } } = await worker.recognize('https://sun9-64.userapi.com/impg/0CWsz00YJIfxnh56aFh8W0spM13BHaJ9G-oG5w/2iwIUlj-nNs.jpg?size=1500x500&quality=96&sign=acb735864f6be56de9f40e9827464e16&type=album');
  console.log(Number(text.replace(/\D+/g,"")))
  await worker.terminate();
})();


I’ve been sitting for 3 hours, looking for Google, I can’t find it, maybe there is a separate language for numbers? Maybe something else, but how can you improve the recognition of numbers in the picture, eng does not see them at all

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question