I spend 2 months 2 years ago on building a passport data extractor. For KYC (know your customer) purposes. Unfortunately I did not manage to get to a situation where the extracted data was really useful. I just tried this JS version (sure the native one is the same) and without changing anything (apart from the training dataset) I got much better results. Exciting.
For passports, I would use the MRZ instead. All of the passport data is encoded there and it's machine readable. http://writecodeeveryday.github.io/projects/passportjs/
Tesseract.js – A Javascript port of the Tesseract OCR engine
31–38 of 38 posts
Re: Tesseract.js – A Javascript port of the Tesseract OCR engine
#32Tesseract sucked for me. Had a simple use case where I was trying to read numbers (in a computer font) from .png files and at completely predictable locations in the image -- and Tesseract was getting it horribly wrong a huge percent of the time. Went with AWS Rekognition and results were instantly 1000x better.
Re: Tesseract.js – A Javascript port of the Tesseract OCR engine
#33First issue I've encountered was the text recognition performance. Depending on the camera input (if the image contained something that looked like the text or not) I've got 2-20+ seconds per 640x640px image for text recognition on iPhone X. Not so fast as you may see. But the recognition was pretty accurate though.
The performance, as expected, improves when the image size is getting smaller and the amount of text on the image is also smaller.
Since I did't want to recognise the whole text, but only the links, I've used the TensorFlow Object Detection model to quickly find the areas with the text http://**. Then, instead of recognising the whole image I needed to do it only for smaller parts of the image. This gave some improvements to the performance: from the variable 2-20 seconds per frame I've got more stable 0.5-1 seconds. Also not good, but several times faster.
I've described the challenges in more details here https://trekhleb.dev/blog/2020/printed-links-detection/. But to sum up, I had a good recognition quality with an arguable performance with Tesseract.js
Re: Tesseract.js – A Javascript port of the Tesseract OCR engine
#34Congrats! Why would one create such a project with JS given all of the languages available to them?
Re: Tesseract.js – A Javascript port of the Tesseract OCR engine
#35Re: Tesseract.js – A Javascript port of the Tesseract OCR engine
#36Re: Tesseract.js – A Javascript port of the Tesseract OCR engine
#37Tesseract sucked for me. Had a simple use case where I was trying to read numbers (in a computer font) from .png files and at completely predictable locations in the image -- and Tesseract was getting it horribly wrong a huge percent of the time. Went with AWS Rekognition and results were instantly 1000x better.
Re: Tesseract.js – A Javascript port of the Tesseract OCR engine
#38Sad as it is to say, it's just not up to snuff for any application I've tried it on.