Inspiration

We are currently developers of a cloud company that offers an all-in-one system that can handle different areas of a business: Sales, Procurement, Inventory Management, CRM, and most importantly, the Financial/Accounting side. Note that we are not AI practitioners at work and we just want to test and improve one area. So we decided to focus on the Procurement part specifically the Accounts Payable process since the total cost of invoice processing can be a huge burden on a business.

A study shows only 14% of invoices are processed through EDI (electronic data interchange), which means that 86% of all invoices are still received as paper or PDF document. This makes the process of capturing the data from an invoice slow and inefficient. Mistakes in classification and data entry can lead to:

  1. Late payments
  2. Missed discounts
  3. Deteriorating relationships with suppliers
  4. Cost overruns

Total cost of invoice processing includes :

  1. Sorting documents
  2. Keying in data
  3. Archiving the invoice

What it does

Our solution, Smart Invoice Capture, aims to:

  1. Eliminate time consuming pre-sorting of invoices and supporting documents.
  2. Improve data accuracy and free up personnel from doing manual keying.

How we built it

This is built on Jupyter Notebook with:

  • MPhasis Document Classifier Model
  • MPhasis Table Detection Model
  • AWS Textract

Due to limitation on SageMaker Request Payload and considering the output of the Table detection Model, we had to use OpenCV API to resize image and extract output using contours.

Challenges we ran into

The table detection model could have provided a better prediction response by including the bounding box instead of just a processed image. We just had to create an extra logic to extract the green box.

Accomplishments that we're proud of

As developers of ERP solutions invoices like Purchase Orders, Sales orders, Vendor Bill and other forms, understanding document processing models from MPhasis, using SageMaker, and other AWS services like Textract have definitely helped us look through possibilities that can automate a lot of process efficiently.

What we learned

Again we do not use AI or Python in our daily job and this event showed us how really amazing AWS is in its Machine Learning products. The provided APIs to deploy models as endpoints and automatically setup the necessary resources are super developer friendly. Running inference is a breeze too.

What's next for Smart Invoice Capture

Lots of work to do!

  1. Improve the output JSON. Extract transaction headers (Invoice #, Date, Vendor, etc.)
  2. Classify PDF files per vendor
  3. Create searchable PDF format for easier search and retrieval in the future
  4. Allow training by the user to simply draw boxes around keywords or areas for labeling.

Built With

Share this project:

Updates