3 ms·
I've used Tesseract.js to recognise the https:// https://** links from the camera input and to make them clickable. First issue I've encountered was the text r
by trekhleb 5y ago
I've used Tesseract.js to recognise the https:// 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:// 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/ 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