Begin extracting information from receipts the smart way with Azure Form Recognizer

It is quite difficult for anyone to programmatically extract information from images and documents.

It also requires some complex machine learning models.

This is when Azure Form Recognizer comes into picture.

It comes with pre-trained machine learning models that can recognize information on various documents, receipts and invoices.

Let’s go ahead and see how we can do that in this step by step demo.

 

Search for Form Recognizer in the Azure Portal and create it.

 

Put it in a resource group. Choose the location and choose free tier which will be enough for us now. Click review + create and then click create.

 

This is what the form recognizer service would look like once it gets created.

 

Now go to keys and endpoint. For the demo purpose, we are going to need key 1 and the endpoint. Copy those and keep them aside for a while.

 

For the demo purposes, we are going to use this sample Contoso receipt. You can easily find this by a simple google search.

 

We are going to run the demo in the form recognizer sample tool. That is a demo website that is going to help us test the Form Recognizer without building an application of our own.

 

Form Recognizer can use a pre-built machine learning model.

 

You can use custom training as well and you can use layout to get text, tables and selection marks.

  • We are going to go ahead with the pre built models.
  • So, from the options, choose the prebuilt model.

 

First of all, put in the key and the endpoint in the respective fields.

 

For the source, choose URL, put in the image URL and click Fetch. It will fetch the image for you.

 

This tool then creates an API request that it will send to the Form Recognizer service.

 

Click Run Analysis.

 

You will see that it will recognize the details in the image.

 

And you will find the results down here. You can also find confidence which you can use in your apps. However, if you noticed, it hasn’t recognized the tip here.

 

That is because we had chosen the form type as invoice earlier. Change it to receipt and run the analysis again.

 

Now you will find the tip as well.

 

You can download the prediction results in both JSON and CSV format and then use it further in your applications.

 

So, you just now saw how Azure Form Recognizer removes the complexity and helps you automatically analyse and recognise documents like receipts and invoices.

You can use this one as a REST API and with SDKs for several languages.

What are you waiting for? Go ahead and try this yourself.