2
$\begingroup$

First of all, I am fairly new to the ML world. I have researched quite a lot on the different use cases that ML have, both in regards to working with text and images.

I am trying to build a "pipeline", that can extract a few data points from various supplier invoices:

  1. Invoice number
  2. Line items (that resides in tables)
    1. For each line item, I would need: quantity and line amount

My first thought was to just use a classic OCR parsing tool such as DocParser (which is basically a template-based OCR parsing tool, where you can create parsing rules for each different type of invoice layout). However, I took a look at my suppliers, and I have a lot of different layouts (with new ones being added regularly).

I was thinking if ML can be used to accomplish this task?

My idea for a pipeline:

  1. All supplier invoices are converted from PDF to an image file (.jpg) and then resized so all have the same width and height.
  2. Train a custom model to extract invoice number using named entity recognization (NER)
  3. Train a custom computer vision model to identify tables that contain line items (product information)
    1. For each table found, extract that as an image and train another model to identify the entities that I need for each line: quantity and line amount

I am not sure if this is a good approach to this problem? Does it make sense to ultimately end off with three models to extract the information that I need? Is there an easier way to detect the quantity and line amount, than by first locating the table on the PDF file?

Does anyone have any experience with a similar process?

$\endgroup$
1
  • 1
    $\begingroup$ If the number of different invoices styles is not overwhelmingly large, I would go with writing custom script for each invoice type. github.com/tesseract-ocr/tesseract does a decently good job at extracting data from images provided they are not hand written. $\endgroup$ – Pankaj Joshi Jan 30 '20 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.