Live data from Hacker News

Tesseract OCR

github.com

61–66 of 66 posts

Re: Tesseract OCR

#61
post #6

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!

>Does it work well on photographs

Usefully, the new macOS / iOS releases will do this automatically (although for macOS you'll need to be running Apple Silicon)

Re: Tesseract OCR

#62
I like this thread. I'm hoping to put together a tool to help catalog info from a specific class of vintage automobiles. The significant info is typically contained on a tag like this

https://www.forbbodiesonly.com/moparforum/threads/fender-tag...

I'd like to capture each item that is delimited by whitespace, convert to text, and store its position and line in a database.

The same code may appear more than once with different meaning, so position is important.

The tags are often different colors as well.

Anyone know which technology may be best or simplest to implement?

This is for a historical search function.

Re: Tesseract OCR

#63
post #44
post #5

Earlier quoted context omitted.

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?

I use a £15 arm with a vice grip for my phone from Amazon, copy the files to my laptop and then run a bash for-loop of the tesseract CLI over the resultant files. I use https://github.com/4lex4/scantailor-advanced to deskew the images and generate the PDF. It isn't perfect but my purposes are more around research than publication, so, YMMV!

Thanks for this and the other replies!

Re: Tesseract OCR

#64

Earlier quoted context omitted.

Does it work well on photographs ? I’d love to run it on my photo library so I can search for shop names etc!

For Android there is a old project from Mozilla that just works like a firecracker on whatever size screenshot directory you have : Firefox ScreenshotGo[beta] https://mzl.la/2NMgD30

It uses Google firebase on device ML OCR (appears to be rebranded as ML Kit).

https://github.com/mozilla-tw/ScreenshotGo

Re: Tesseract OCR

#65

If you are trying to detect text from document images / photos: tesseract is strongly focused mainly on the OCR part of the whole preprocessing(1). If you would like to get better results on that, you could use the wolf binarization tool (2) as an easy adaptive thresholding to remove shadows and uneven areas, which should improve your OCR results a lot on document photos! (1): https://towardsdatascience.com/pre-proce…

Many years ago there was specific OCR software (SpotlightPro / RasterDesk) for vectorize scanned technical drawings to CAD formats (with dimension lines, text labels, etc.); now there is Scan2CAD[0]. All them are proprietary software.

Sadly I can't find any open-source vectorizer & OCR for repair scanned technical drawings, and Tesseract has a lot of issues with rotated text labels specific to CAD.[1]

[0] https://alternativeto.net/software/scan2cad/

[1] https://groups.google.com/g/tesseract-ocr/c/t-2Ru9h4xSc

Re: Tesseract OCR

#66

Earlier quoted context omitted.

You typically need to pre-process the images. I'd recommend https://scantailor.org/ for this (OSS, but unmaintained)

This has the latest developments, but is also seemingly unmaintained for over a year: https://github.com/4lex4/scantailor-advanced Scan Tailor forum: https://forum.diybookscanner.org/viewforum.php?f=21

> [ScanTailor Advanced] seemingly unmaintained for over a year

ScanTailor official repo also archived on November 29, 2020.[0]

> This project is no longer maintained, and has not been maintained for a while.

As alternative to ScanTailor (and its forks) there is gImageReader (Tesseract Qt/GTK GUI), but also seems like unmaintained since 2019.[1,2]

[0] https://github.com/scantailor/scantailor/commit/e881b30b6ed1...

[1] https://github.com/manisandro/gImageReader

[2] https://github.com/probonopd/gImageReader/releases/tag/conti...

Post reply on HN