Live data from Hacker News

Tesseract.js – A Javascript port of the Tesseract OCR engine

tesseract.projectnaptha.com

31–38 of 38 posts

Re: Tesseract.js – A Javascript port of the Tesseract OCR engine

#31

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/

Mrz is just encoded string. But it says nothing. For proper validation you need to get the readable values as well.

Re: Tesseract.js – A Javascript port of the Tesseract OCR engine

#32

Tesseract 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.

Post processing is absolutely essential with tesseract. Not to self promote but I discussed this at some length in this blog post, if you're interested: https://kn100.me/taking-back-data-from-eufy/

Re: Tesseract.js – A Javascript port of the Tesseract OCR engine

#33
I've used Tesseract.js to recognise the https://** links from the camera input and to make them clickable.

First 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

#36
Being disappointed by classic open source OCR I started an attempt to package neural net based approaches (https://github.com/gtsoukas/scene_text, don't use it, it is crap), then I found out that Googles' ML Kit (https://developers.google.com/ml-kit/vision/text-recognition) gives quite good results, as long as it is for latin based character sets.

Re: Tesseract.js – A Javascript port of the Tesseract OCR engine

#37

Tesseract 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.

I think it's mostly for OCR'ing high-resolution scans of printed media. I scanned and OCR'd a several hundred page printed book (my grandfather's memoirs) with great results. The text needed very little processing. But I had to manually transcribe all of the image captions, because they were scans of photocopies of photocopies of typewriter labels stuck to photos by hand, and thus very poor quality, and Tesseract produced complete gibberish.
Post reply on HN