Better HN
topnewbestaskshowjobs
Log inSign up

ocrcustomserver

38 karma · joined Jun 21, 2017 (9y ago) · 70 submissions

I'm an independent consultant in the documents space.

Do you need to extract text from PDF documents (unstructured, semi-structured or forms)?

Do you have an OCR problem?

I can probably help.

Feel free to contact me: ocrcustomserver@gmail.com

Submissions

comment 8y ago · link · parent

What is your use case?

comment 8y ago · link · parent

In the OCR world this is known as offline OCR (OCR on the bitmap) vs online OCR (strokes information).

Offline is way harder than online.

comment 8y ago · link · parent

It's not a stupid question. You need equation detection + equation OCR.

Mathpix only does the equation OCR part.

I've worked on this (for a PDF to HTML application), mail is in profile if you're interested.

comment 8y ago · link · parent

I mean leads in the form of listings contained in pdf documents. The problem is that parsing/extracting that data is non-trivial.

In general:

  - pdf to Salesforce
  - pdf to Excel
  - pdf to database

comment 8y ago · link · parent

Like leads "locked" in pdf documents?

comment 8y ago · link · parent

I've been working on a prototype that does exactly this. Sent you an email.

comment 8y ago · link · parent

Are you still interested in this? I might be able to help.

comment 8y ago · link · parent

Or self-host it and never send out any data. (I'm offering a self-hosted solution for OCR)

comment 9y ago · link · parent

Just to be sure that we're talking about the same thing, by "custom parser" I meant implementing your own barebones "zonal OCR" functionality with just the features that are needed for the specific problem.

I think it boils down to the needs of each individual application.

Some cases have a lot of templates and need the "automatic fuzzy matching" functionality and the extra bells and whistles.

But smaller players often deal with just a handful of relatively simple templates where FlexiCapture would just be overkill (not to mention a couple of other problems that I'm covering at the end of the post). This is of course not an easy task because you need someone who can design and implement an end to end system that possibly involves image processing, "zonal OCR", include an OCR engine and also perform reliable text extraction from images/PDFs (extracting text from PDFs is tricky). It's way easier for a non developer to think about what rulesets/logic to apply and not having to think about the image processing/OCR bits. I think that is one of the main selling points of FlexiCapture. It abstracts the OCR bits so that the system designer can think about the problem itself, design a spec and think about the logic the logic. Do you need deskewing of documents? Click a button and you get deskewing.

Which brings me to the second point. The products sold by ABBYY/Nuance are meant to be used by integrators (no programming needed other than the occasional VB.net script), not image processing specialists/developers. In my (biased) opinion, it makes more sense for some businesses to go the custom route instead of investing in FlexiCapture.

There is also FlexiCapture Engine that is meant for developers. This has the same problems as the other offerings by ABBYY (I don't know about Nuance but I suspect it's the same):

  - expensive
  - vendor lock-in
  - ridiculous extra costs for things like "cloud/VM license", exporting to PDF, etc.
  - limits on how many pages you can process per year or in total (complex licensing schemes)
  - ABBYY really wants to sell you their own cluster/cloud management services which is all proprietary
  - limited flexibility in implementing distributed services, costs that add up fast, you have to be trained in their own stack
Can you provide an example where you think that a custom solution would not work? I'm curious.

comment 9y ago · link · parent

I would be interested in exchanging notes, send me an email if you're up to it.

comment 9y ago · link · parent

If you're looking for full page OCR, check out ocrmypdf (uses Tesseract).

If you want to extract data out of documents/forms then you need to develop your own solution (I'm doing work in this area) or use expensive packages like ABBYY FlexiCapture.

Images taken from a smartphone (compared to scanned documents) is going to make the problem harder.

comment 9y ago · link · parent

There are two options for this, one is online and the other is offline handwriting recognition.

Online is when you have info about the strokes (e.g. writing on a tablet or on a HTML5 canvas), offline is when you don't anything other than the image.

Online is mostly solved, offline is not working well yet. Deep learning will certainly help accelerating progress.

I'm working on a prototype that extracts (and transcribes) handwriting info from PDF documents (like forms).

comment 9y ago · link · parent

They use multiple OCR engines. Some developed in-house and some proprietary ones. A blog post mentions I.R.I.S. as one of the proprietary ones.

They don't offer OCR publicly, instead, they generate a list of possible candidates to match against search queries (fuzzy matching).

From one of the blog posts: "Employing multiple reco engines is important not only because they specialize on different types of text and languages, but also as this allows to implement ‘voting’ mechanism — analyzing word alternatives created by diverse engines for the same word allows for better suppression of false recognitions and giving more confidence to consensus variants."

More: http://blog.evernote.com/tech/2013/07/18/how-evernotes-image...

http://blog.evernote.com/tech/2011/11/01/even-grittier-detai...

http://blog.evernote.com/tech/2011/09/30/evernote-indexing-s...

comment 9y ago · link · parent

It uses LSTM for the line recognizer.

comment 9y ago · link · parent

I wouldn't say that full page OCR is trivial. Using an opensource solution (99% based on Tesseract) is going to get you ok-ish results if your input is relatively clean (no complex layout, scanned documents from a flatbed scanner, standard fonts) and you don't care about speed. If you care about recognition accuracy then Tesseract isn't going to cut it (at least not without some serious effort).

Replying to points 1 and 3: For smaller players and/or complex tasks you can always implement your own custom parser.

I'm doing work as a contractor in this space.

comment 9y ago · link · parent

Some thoughts (adding to staticautomatic's post):

1. There is no dataset/competition like ImageNet for OCR.

2. Most people/conferences/universities are going after natural images and "computer vision" problems. OCR is its own animal and while it shares some concepts with computer vision it's not the same thing.

3. A lot of IP, knowledge and talent locked up in a handful of very old companies doing this for a long time. ABBYY is for OCR what Google + Facebook are for deep learning (maybe more).

4. OCR is kind of a niche, a lot of knowledge is not available to many people outside of a few insiders (ABBYY/Nuance, universities, research labs, OCR conferences). I'm sure Google uses it a lot internally (e.g. Google Street View numbers etc.).

5. The incumbents don't just do OCR. They do preprocessing (computer vision/image processing) + OCR + NLP.

6. Hard to find data. ABBYY Finereader supports 190 languages. Collecting this data is no easy task.

I'm probably missing other reasons as well, but this is just off the top of my head.

That being said, I'm sure that there's going to be a lot of progress in the OCR + deep learning space soon.

comment 9y ago · link · parent

Well it is more complex than it appears.

Extracting data from documents requires a solution which uses OCR but is a different product (e.g. ABBYY FlexiCapture).

This is most commonly referred to as zonal OCR and comes with the added functionality of handling multiple templates, defining zones/fields, specifying special rules for fields, verification process for manual inspection (e.g. triggered when the image receives a low confidence recognition score) etc. This is different and more complex than a product that does full page OCR (e.g. ABBYY Finereader).

Handwritten OCR is a whole different story. The products that do zonal OCR will fail to recognize handwritten text, unless it's in boxes (PDF forms). I'm working on a prototype that can handle handwritten text outside of boxes too.

comment 9y ago · link · parent

ABBYY has dominated the field for many years (decades really) and still outperforms every solution out there. OmniPage by Nuance is probably the second best.

Preprocessing the images (OCR pipeline) is very important for OCR. For generic scanned PDF documents Finereader does a pretty good job.

There is a lot of stuff going on in a OCR engine. Layout analysis, dewarping, binarization, deskewing, despeckling (and others) and then there's the OCR itself. With Tesseract you have to do a lot of things yourself, you have to provide it with a clean image. The commercial packages do that for you automatically. ABBYY and other solutions also use NLP to augment/check the OCR results from a semantic analysis perspective.

Also, there is no "one size fits all" OCR. It is highly specific to the nature of the application. Consider the following use cases:

  - scanned PDF document
  - scanned document with a non-standard font (e.g. Fraktur script in a historic book)
  - photo of scanned document acquired with a mobile phone's camera
  - passport OCR (MRZ)
  - credit card OCR
  - text appearing in natural image (e.g. store sign)
These are all "OCR projects" but they require very different approaches. You cannot just throw any input image at an OCR engine and expect it to work. It often requires a mix of computer vision/image processing, machine learning and OCR engine.

There is a growing number of papers using deep learning that get submitted to ICDAR (the premier OCR conference) and the other OCR conferences. One of the problems is the lack of a universal dataset/competition like ImageNet. The SmartDoc competition (documents captured from smartphones) was cancelled this year due to an insufficient number of participants.

If anyone is doing work with OCR + deep learning, I'd love to discuss!

comment 9y ago · link · parent

For an opensource solution that uses Tesseract, check out ocrmypdf: https://github.com/jbarlow83/OCRmyPDF

comment 9y ago · link · parent

I'm offering a self-hosted solution, mail is in profile.

comment 9y ago · link · parent

Any recommendations for similar looking stylesheets?

comment 9y ago · link · parent

What kind of pricing schema would you prefer for this? Monthly or one time payment?

comment 9y ago · link · parent

Interesting, I have implemented some version of the above in the past (albeit not in an opensource/free solution).

If you have a specific document/data extraction need in mind, you can email me a sample and I will let you know if I can help.

comment 9y ago · link · parent

I'm working on it, email me for early access.

comment 9y ago · link · parent

Can you elaborate? What is the use case?

comment 9y ago · link · parent

Really like this! I'm working on something similar, a generic PDF to HTML converter that enables reflowing of documents on a mobile device.

Any recommendations for HTML templates other than the distill.pub one?

comment 9y ago · link · parent

I just visited Project Gutenberg and tried opening a few books. There seems to be a HTML option, what did you mean?

comment 9y ago · link · parent

This is great! How do you detect the fields? Are you using image processing?

comment 9y ago · link · parent

Cool project!

Shameless plug: if you need the opposite, i.e. getting text/structured data out of filled PDF forms (or any kind of PDF document), feel free to contact me.

comment 9y ago · link · parent

If you deal with pdf documents, I might be able to help. Mail is in profile.
123