I finally figured out how to use the Tesseract CLI utility on macOS today (installed from Homebrew). It's really neat - you can use it to turn a PNG into a PDF with embedded text, which you can then copy-and-paste: https://til.simonwillison.net/tesseract/tesseract-cli I learned about it from this post: https://alexn.org/blog/2020/11/11/organize-index-screenshots...
Does it work well on photographs ? I’d love to run it on my photo library so I can search for shop names etc!
Tesseract OCR
31–40 of 66 posts
Re: Tesseract OCR
#32(1): https://towardsdatascience.com/pre-processing-in-ocr-fc231c6... (2): https://github.com/chriswolfvision/local_adaptive_binarizati...
Re: Tesseract OCR
#33I must’ve done things spectacularly wrong cuz the two times I’ve tried tesseract (second time to recognize factory printed 8 inch tall letters on a trash can), I got 0% accuracy. 0%. Not even close. So I gave up.
You typically need to pre-process the images. I'd recommend https://scantailor.org/ for this (OSS, but unmaintained)
Scan Tailor forum: https://forum.diybookscanner.org/viewforum.php?f=21
Re: Tesseract OCR
#34I finally figured out how to use the Tesseract CLI utility on macOS today (installed from Homebrew). It's really neat - you can use it to turn a PNG into a PDF with embedded text, which you can then copy-and-paste: https://til.simonwillison.net/tesseract/tesseract-cli I learned about it from this post: https://alexn.org/blog/2020/11/11/organize-index-screenshots...
Does it work well on photographs ? I’d love to run it on my photo library so I can search for shop names etc!
Re: Tesseract OCR
#35I must’ve done things spectacularly wrong cuz the two times I’ve tried tesseract (second time to recognize factory printed 8 inch tall letters on a trash can), I got 0% accuracy. 0%. Not even close. So I gave up.
Yeah tesseract is more like the bit that would sit in the middle of an ocr solution than a complete solution. But it’s all we’ve got for free at the moment. You pretty much need black text on white background at 300-600 dpi. (Not sure the exact size but I’ve had crappy scans do better by scaling the file.) I’ve had reasonable success with photos of printed pages run through text cleaner.
Doesn't OCRopus qualify as well (it does look unmaintaned, or less actively maintained than Tesseract)?
Re: Tesseract OCR
#36I finally figured out how to use the Tesseract CLI utility on macOS today (installed from Homebrew). It's really neat - you can use it to turn a PNG into a PDF with embedded text, which you can then copy-and-paste: https://til.simonwillison.net/tesseract/tesseract-cli I learned about it from this post: https://alexn.org/blog/2020/11/11/organize-index-screenshots...
I read HN on my kindle[1] to assimilate knowledge from the comments using its highlighting, clipping features.
But commenting is painful on Kindle's 'forever experimental browser' so I take a screenshot and when I connect it to the computer the to-comment stack on a network to-do list is updated with a ready to visit HN story URL using query from the text on the screenshot parsed using Tesseract.
[1] https://hntokindle.com/ (Disclaimer: I built this)
Re: Tesseract OCR
#37I have found EasyOCR to be more accurate in OCR than tesseract. Curious to learn about HN-ers experience with those tools.
Re: Tesseract OCR
#38> Tesseract was originally developed at Hewlett-Packard Laboratories Bristol and at Hewlett-Packard Co, Greeley Colorado between 1985 and 1994, with some more changes made in 1996 to port to Windows, and some C++izing in 1998. In 2005 Tesseract was open sourced by HP. From 2006 until November 2018 it was developed by Google. I have used Tesseract for OCRing scanned books and it was great. I had no idea it was so old,…
I have permission to publish an ebook edition of an out of print history of Portland, Oregon. I haven’t found the time to work on the project. One point of friction has been selecting an OCR workflow. Any chance you would share what you’ve been successful with?
Most of time was spent in field parsing and validating ocr output (is it valid date). At one point I realized that playing with tess config was giving marginal improvement, and investment in post-ocr parsing/wrangling was more valuable e.g. in date column, if ocr says b, consider it 6 and flag low confidence record.
One new nice-to-have use case customer asked was varying orientation of pages, that I couldn't hack together quickly.
Re: Tesseract OCR
#39I tried to use this library to process nutrition labels for a fitness app. Sometimes took 40 seconds to process, which is unacceptable for a phone app. I remember seeing a video where a google product used a neural net and resolved the same info in 1 sec or so.
Re: Tesseract OCR
#40I didn't know that google had stopped maintaining it. Interesting.