News for hackers. Stuff that matters.

ocrcustomserver

What is the reason that you want to roll your own?

Is it because you want to own the IP or for learning purposes?

For the state of the art check the ICDAR, DAS and ICFHR (for handwriting) conferences.

For an overview: https://github.com/handong1587/handong1587.github.io/blob/ma...

What is the accuracy that you're getting from it?
From the Tesseract FAQ:

"Can I use Tesseract for handwriting recognition?

You can, but it won’t work very well, as Tesseract is designed for printed text. Look for projects focused on handwriting recognition."

https://github.com/tesseract-ocr/tesseract/wiki/FAQ#can-i-us...

  (literally just scale it up x2 or x4).
Just to clarify, the input image should be 300dpi.

  In this case, the use is extracting words that can be used in full-text search, so structural extraction isn't a key criteria.
In case someone wants to know more, the former is known as "full page OCR" and the latter as "data capture"/"document processing" (or IDP, intelligent document processing).

Full page OCR for machine printed text is considered a solved problem (but not for handwritten text). Data capture is hard to do and involves extracting specific fields from documents.

The first big cloud company going into data capture territory was Amazon with AWS Textract (calling it OCR++). There's also Document Understanding AI (Google) and Azure Form Recognizer in Beta, as mentioned by others in this thread.

The big 3 RPA companies (UiPath, Automation Anywhere, Blue Prism) have also gone into data capture (calling it cognitive or intelligent RPA).

ABBYY (with FlexiCapture) and Kofax (who recently acquired Nuance's imaging division, the 2nd most popular OCR engine after ABBYY's) are the traditional IDP players.

Typically OCR accuracy is measured in two ways, CER (Character error rate) and WER (Word error rate). If just one number is provided, it's typically CER.

"Finding words in images" is a bit ambiguous. It can mean "word spotting" (intended for retrieval rather than transcription) but also "text segmentation" (part of preprocessing step before OCR).

"The problem is that while Textract works really well for well defined tabular data it does not work for tables where the rows and columns are implied with white space, instead of lines."

This is what Tabula and Camelot call "Stream" and "Lattice" parsing methods.

Whitespace between cells is Stream, demarcated lines is Lattice.

Accuracy of Google OCR vs Tesseract v4 (on books and web): https://imgur.com/a/Tj0TASf
The Apple Newton was capable of online OCR (doesn't have to do with internet connectivity in this case).

As you mention, online OCR is when you input the strokes directly on the device vs offline OCR where the input is an image.

Some trivia:

The first version of handwriting recognition engine of the Newton was developed by ParaGraph International (founded by the founder of Evernote). Another version (Print Recognizer) was later developed by Apple.

https://web.archive.org/web/20120324055221/http://www.beanbl...

I'm curious, if you email me a sample I can tell you what's possible.
Re:RNN-Based Handwriting Recognition in Gboard on Friday March 08, 2019 @07:22PM (#19343561)
The reason is that online OCR (this particular case) is entirely different from offline OCR.

Online OCR is when you input the strokes directly on the tablet/phone, so it becomes a sequence of XY coordinates with an associated timestamp. It takes into account where you start and where you end the stroke on the canvas, along with the intermediate points (information galore).

Offline OCR is when you take a photo of your handwriting in your notebook, so you just get the raw pixels of a image. In offline OCR, you'd also have to properly segment and binarize the image before the OCR step.

With that being said, tesseract (version 4) uses an LSTM.

Re:Hospitals release lists of retail prices for services on Sunday January 13, 2019 @07:57PM (#18899773)
Does a list of all hospitals (in each state) exist somewhere?
pdfminer is another good library (Python).
Re:The Fax Is Not Yet Obsolete on Sunday December 02, 2018 @09:31PM (#18585964)
If this is important to you (extraction of information like ID/name/date from non-searchable PDFs), you could send me an email and we could discuss it further.

I might be able to help you with this.

Some videos that were just released:

Announcing Amazon Textract, https://www.youtube.com/watch?v=PHX7q4pMGbo

Introducing Amazon Textract: Now in Preview, https://www.youtube.com/watch?v=hagvdqofRU4

Introducing Amazon Hieroglyph: Now in Preview (AIM363), https://www.youtube.com/watch?v=FnZFK_2oqKk

There's ABBYY FineReader Engine CLI for Linux: https://www.ocr4linux.com/
This is very interesting. I'm curious to see how they will execute on several points:

1. How it will deal with multiple templates that the system hasn't seen before. Especially when there is significant difference between the templates.

2. UI/UX. E.g. how it will trace the extracted data to the original source and how it will show the confidence scores of each entity.

3. Verification process, how will the workflow look like when the confidence score is low and the document has to be checked by human operators.

As tracker1 mentioned, don't think of this as for reflowing text for different devices but as a data capture and documents processing solution.

Example: You are dealing with a lot of PDF documents that contain unstructured information (e.g. a filled form) and you need to extract bits of information (e.g. name, address) and output it in a structured format (e.g. JSON/XLS).

Shameless plug: I work on custom solutions that do this locally, shoot me an email if interested.
There's Google Cloud Vision and Microsoft Cognitive Services that act as competitors to Amazon Rekognition, but AFAIK there's no offering from a FAANG that competes with AWS Textract.

It looks like it's competing with ABBYY (FlexiCapture) and Kofax.

The docs page [1] (subject to change) mentions:

Do you support handwriting? – We do not support handwriting extraction.

[1]: https://docs.aws.amazon.com/textract/latest/dg/how-it-works-...

OneNote can do transcription (copy text from image).
Yeah, Evernote's OCR engine will generate possible candidates for every given word and will sort them internally by confidence score.

Screenshot: https://s24953.pcdn.co/blog/wp-content/uploads/2018/02/longh...

Since it's not aimed for transcription (user doesn't know what he's looking for) but for retrieval (user knows what he's looking for), it can get away with mistakes.

References:

https://evernote.com/blog/how-evernotes-image-recognition-wo...

https://help.evernote.com/hc/en-us/articles/208314518-How-Ev...

https://evernote.com/blog/evernote-indexing-system/

In tesseract, if you want to recognize both English and German you can use option -l deu+eng.

If you want to perform language detection you can do the following:

a. Invoke tesseract with "-l eng".

b. Pass the output text to langdetect [1]. It is a port of Google's language detection library to Python which will give you the probabilities of the languages for a given text.

c. Invoke tesseract with "-l langdetect_output"

Note that langdetect generates 2 character codes (ISO 639-1) whereas tesseract expects 3 character codes (ISO 639-2).

[1]: https://github.com/Mimino666/langdetect

I was surprised to see them also announce "Amazon Comprehend Medical" which is NLP for a specific vertical: https://aws.amazon.com/comprehend/medical/
You can also try https://docparser.com/.

If nothing works for you and you're comfortable with sharing an example file, you can send it to me and I could take a look.

Which OCR did you use?
Re:Show HN: Convert screenshots of equations to LaTeX on Friday March 09, 2018 @02:53PM (#16554441)
Can you send me an email? I might have something like that working soon.

Older »