OCR for detecting bills

Viewed 14508

I am planning on creating a mobile app which can scan a bill/invoice generated by shop and extract key features from it like shop name, address, items purchased, bill value etc. I understand i can use OCR to extract text from the bill (a scanned bill or a photo of the bill) but then how would i extract all these details? What approach to use?

3 Answers

The best option that I have found, which is also free, and works with most programming languages (C#, Java, Objective-C, Ruby, PHP, etc.) is Cloudmersive OCR:

It can automatically identify a document, receipt or bill within a photo, and then automatically extract the text very reliably.

I’m using it right now on a business application in production, working pretty well so far.

It depends on how much of your own solution are you willing to roll out. The trouble with bills is that a bill from each shop looks really different (often even if they are using the same accounting software, weirdly enough), plus noisy OCR means not just potential errors in the data, but also in texts of the labels you might use to match the data fields. All in all, doing this by a naive approach like OCR + rule matching (e.g Abbyy FineReader + Apache Tika, as suggested in the other answer) is going to be a really fragile approach.

You can get much better solutions nowadays but they are going to be tricky to home-grow without a lot of deep learning knowledge, as they are based on state-of-art AI. Your best resort is to just use an online service for this, the most popular ones are free for low data volumes. Particularly noteworthy may be:

  • TagGun - specialized on receipts, can extract line-items too, free for 50 receipts monthly
  • Elis - specialized on invoices, supports a wide variety of templates automatically (a pre-trained machine learning model), free for under 300 invoices monthly
  • infrrd.ai - limited data taxonomy relative to above, free web-based demo but you need to purchase the API

(disclaimer: I'm affiliated with Rossum, the vendor of Elis. Feel free to suggest edits adding other APIs!)

Related