Live data from Hacker News

Frog: OCR Tool for Linux

tenderowl.com

41–49 of 49 posts

Re: Frog: OCR Tool for Linux

#42

This looks like a nice app. I was looking for something like this a while back until I noticed that there are "one" liners that can you can setup for a hotkey: #!/usr/bin/env bash langs=(eng ara fas chi_sim chi_tra deu ell fin heb hun jpn kor nld rus tur) lang=$(printf '%s\n' "${langs[@]}" | dmenu "$@") maim -us | tesseract --dpi 145 -l eng+${lang} - - | xsel -bi

Nice, that is great! I adapted this to work for me on wayland (sway):

grim -g "$(slurp)" - | tesseract --dpi 145 -l eng+${lang} - - | wl-copy

Using grim to take a screenshot, slurp to mark a region on your screen and wl-copy to copy to clipboard.

Re: Frog: OCR Tool for Linux

#43
post #2

Appears to be a nice wrapper around Tesseract: https://github.com/tesseract-ocr/tessdata https://en.wikipedia.org/wiki/Tesseract_(software) The demo of course works perfectly on a Mac as this is already built into Ventura. If you haven't experienced it yet ye olde ctrl-f now seamlessly sneaks a peak into images on the page for example, surprisingly useful. In November 2020, Brewster Kahle from the Internet Archive pr…

In 2019 I was working on a project that involved OCRing millions of scanned historical documents. I evaluated Google, Azure, Amazon, Adobe, ABBYY, and Tesseract somewhat rigorously.

Google's was by far the best, especially for obscured or malformed characters. Azure was second and I ended up merging the results from both.

For my use case (in Spring 2019) Tesseract was not very accurate and struggled with slanted text especially. Hopefully that has changed.

Re: Frog: OCR Tool for Linux

#44
Cool! I've seen similar ideas before and made my own inspired by these some years ago. It's a simple bash script based on Flameshot [0] for taking the screenshot and Tesseract:

    #!/usr/bin/env bash

    rm -f /tmp/screen.png
    flameshot gui -p /tmp/screen.png

    tesseract \
      -c page_separator="" \
      -l "eng" \
      --dpi 145 \
      /tmp/screen.png /tmp/screen

    if [ "$(wc -l 
[0]: https://flameshot.org/

Re: Frog: OCR Tool for Linux

#45
post #20
post #16

Earlier quoted context omitted.

Google OCR is definitely not the same as Tesseract, although it's true that Tesseract is maintained by Google. Google OCR has definitely much higher accuracy and is significantly faster (basically always taking 1s for inference, while Tesseract can easily take 10s or more for dense pages). Source: I work in developing a competing OCR service and we keep an eye on competition (e.g. aside from Google, solutions by Azur…

> Source: I work in developing a competing OCR service and we keep an eye on competition (e.g. aside from Google, solutions by Azure, Amazon, Abbyy, Nuance, Cloudmersive, etc., as well as our internal product of course, which is not available externally), and they are (almost) all significantly better on Tesseract. Great. How do you quantify it and keep track? Is there an industry standard benchmark? Would you consid…

Sorry for the late answer.

Short answer is: we can't and we don't. Most EULAs explicitly prevent users to benchmark results, and we don't want to incur into any such risk. Plus, since we develop a competing product, any "deep look" into the competition might be seen as reverse engineering it, and our company is very careful to avoid such problems.

Our company has dedicated teams to evaluate competition products, so we once asked them (a couple of years ago), and could only look at aggregated, anonymized results. But the patterns were very clear. Anecdotical experience (mostly coming from customers of ours who, themselves, compare our internal engine with alternatives) seemed to point to the fact that most of the competition have rather stable service, so quality likely didn't evolve much in the last two years, but we can't be sure of course.

We constantly track our own accuracy on internally developed benchmarks, because frankly the ones available online (also for research purposes) are very bad. But as said, we can only continuously test our own engine and open source ones (like Tesseract), for legal reasons.

Re: Frog: OCR Tool for Linux

#46
post #16

Earlier quoted context omitted.

Google OCR is definitely not the same as Tesseract, although it's true that Tesseract is maintained by Google. Google OCR has definitely much higher accuracy and is significantly faster (basically always taking 1s for inference, while Tesseract can easily take 10s or more for dense pages). Source: I work in developing a competing OCR service and we keep an eye on competition (e.g. aside from Google, solutions by Azur…

I don't get how it's a competing product if it's not available externally? What field is it if you can answer that?

Sure, our company deals with business documents and typically sells products higher in the stack. Our OCR offering is available to customers, but only if they buy a significantly larger pack of products that does information extraction. As a matter of fact, OCR results are included in there, so customers could (and very rarely do) buy the whole package for OCR purposes only. It's just not advertised/sold independently, so it doesn't make much sense for most customers to buy it for that purpose (unless they have really tiny volumes) because price-wise is much more expensive than alternative products only selling OCR.

Re: Frog: OCR Tool for Linux

#47
post #45
post #20

Earlier quoted context omitted.

> Source: I work in developing a competing OCR service and we keep an eye on competition (e.g. aside from Google, solutions by Azure, Amazon, Abbyy, Nuance, Cloudmersive, etc., as well as our internal product of course, which is not available externally), and they are (almost) all significantly better on Tesseract. Great. How do you quantify it and keep track? Is there an industry standard benchmark? Would you consid…

Sorry for the late answer. Short answer is: we can't and we don't. Most EULAs explicitly prevent users to benchmark results, and we don't want to incur into any such risk. Plus, since we develop a competing product, any "deep look" into the competition might be seen as reverse engineering it, and our company is very careful to avoid such problems. Our company has dedicated teams to evaluate competition products, so w…

Thank you kindly. :)

Re: Frog: OCR Tool for Linux

#48
post #46

Earlier quoted context omitted.

I don't get how it's a competing product if it's not available externally? What field is it if you can answer that?

Sure, our company deals with business documents and typically sells products higher in the stack. Our OCR offering is available to customers, but only if they buy a significantly larger pack of products that does information extraction. As a matter of fact, OCR results are included in there, so customers could (and very rarely do) buy the whole package for OCR purposes only. It's just not advertised/sold independentl…

Thanks!

Re: Frog: OCR Tool for Linux

#49
post #12
post #4

Earlier quoted context omitted.

Last I compared them, (1-2 years ago), Google OCR was much much better and supported more languages than tesseract. There was also an OCR in openCV, which was slightly better than tesseract, but not good enough to be useful.

I’m not aware of any separate OCR in OpenCV. Some builds include an interface to Tesseract, which might be what you’re thinking of. Tesseract certainly benefits from preprocessing (conversion to grayscale, posterization) with OpenCV.

There was "EAST OCR" detector, which is basically someone put a deep learning model in openCV somehow. https://www.folio3.ai/blog/text-detection-by-using-opencv-an...
Post reply on HN