Build A Custom Model Using Azure Form Recognizer-Part 2

April 26, 2022 | Comments(2) |

TABLE OF CONTENT

1. Introduction to Azure Form Recognizer
2. Prerequisites
3. Step by Step Guide
4. Conclusion
5. About CloudThat
6. FAQs

1. Introduction to Azure Form Recognizer

Azure Form Recognizer is a cloud-based Azure Applied AI Service that extracts key-value pairs, text, and tables from your documents using AI-powered data solutions. Form Recognizer examines your documents and forms, extracting text and data, mapping field relationships as key-value pairs, and returning a structured JSON output.

Here is a blog on Automate Report Extraction with Microsoft Azure Cognitive Service: Form Recognizer – Part 1 that can help you refresh your understanding.

Let us get started with the Form Recognizer Sample Labeling tool:

The Form Recognizer Sample Labeling tool is an open-source tool that enables you to test the latest features of Azure Form Recognizer and Optical Character Recognition (OCR) services:

  • Analyze documents with the Layout API: Extract text, tables, selection marks, and structure from documents.
  • Analyze documents using a prebuilt model: Start with a prebuilt model to extract data from invoices, receipts, identity documents, or business cards.
  • Train and analyze a custom Form: Use a custom model to extract data from documents specific to distinct business data and use cases.

2. Prerequisites

You will need the following to get started:

  • An Azure subscription
  • A Cognitive Services or Form Recognizer resource: Once you have your Azure subscription, create a single-service or multi-service Form Recognizer resource in the Azure portal to get your Key and endpoint.

3. Step by Step Guide

Step 1: Sign in to the Azure Portal, search for form recognizer in the search bar and select the service
Azure Form Recognizer

Step 2: Click on Create form recognizer.
Azure Form Recognizer

Step 3: Provide the appropriate details as below :

  • Select the appropriate subscription
  • Create a new Resource group else select the required Resource group if you have already created it
  • Select the region where you want to deploy the service
  • Provide the appropriate name for the service

Azure Form Recognizer
Select the pricing tier F0 which is the free tier and click on Review + create

Step 4: Once the service is deployed keep a note of Keys and Endpoint which will be required in the next steps
Azure Form Recognizer

Step 5: Now, create a storage account with the appropriate name, region, and keep other details as default

Click on Review + create
Azure Form Recognizer

Step 6: Select the containers from the left panel and create a new container to store the images where the public access level should be Blob
Azure Form Recognizer

Step 7: Click on Upload. Upload the images on which you want to build the custom model of the form recognizer
Azure Form Recognizer
Azure Form Recognizer

Step 8: Select the storage account created in Step 5, select the CORS from the left panel and configure the settings as shown below and click on Save
Azure Form Recognizer

Step 9: Create the SAS URL as shown below
Azure Form Recognizer

Step 10: Copy the Blob SAS URL add the container name in the URL as shown below:
Azure Form Recognizer
Azure Form Recognizer

Step 11: Go to https://fott.azurewebsites.net/ and click on the Connection symbol in the left panel

  • Click on the “+” at the top to add a new connection
  • Provide the name for the connection and SAS URL generated in Step 9
  • Click on Save Connection

Azure Form Recognizer
Step 12:
Once the connection is created go to Home, select the custom model and click on New Project
Azure Form Recognizer
Azure Form Recognizer

Step 13: Provide the appropriate details as given below :

  • Provide the name for the project
  • Select the connection created in Step 11
  • Provide the endpoint of the form recognizer noted in Step 4
  • Provide the Key of the form recognizer noted in Step 4 and click on Save Project

Azure Form Recognizer

Step 14: Once the project is created the images stored in the container will be loaded on the left panel

  • Add the tags as shown below by clicking on “+”. Let’s assume you have to extract the Name of the person, No. of days of leaves, and the status of the leave applied from the custom images provided

Azure Form Recognizer
Step 15:
Select the appropriate data from the image and select the relevant tags for the same. Tag all the images as shown below
Azure Form Recognizer

Step 16: Once the tagging of images is done select the “Train” model from the left panel. Provide the name for the model and click on Train
Azure Form Recognizer

Step 17: It will take some time to train the model. Once the model is trained it will provide the results as shown below. You can view the accuracy of the trained model
Azure Form Recognizer

Step 18: Let’s analyze the model by providing one of the images and click on Run analysis
Azure Form Recognizer

Step 19: It will analyze the given image and provide the desired output as shown below
Azure Form Recognizer

Conclusion:

Azure Form Recognizer’s deep-learning-based universal models support many languages that can extract multi-lingual text from images and documents, including text lines with mixed languages. It uses Natural Language Processing (NLP) to detect and extract information from forms and documents supported by AI to provide more structure and information to the text extraction. Hence, it helps us to quickly get accurate results that are tailored to the specific content without excessive manual intervention or extensive data science expertise.

About CloudThat

CloudThat is the official Microsoft Gold Partner, AWS Advanced Consulting Partner, and Training partner helping people develop knowledge on the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

Feel free to drop a comment or any queries that you have regarding Azure Form Recognizer, Azure Cognitive service, and Azure form recognizer API, we will get back to you quickly. To get started, go through our Expert Advisory page and Managed Services Package that is CloudThat’s offerings.

FAQs:

  1. Does Form Recognizer integrate with other Microsoft services?

Yes, Form Recognizer integrates with the following services:

  • AI Builder workflows
  • Azure Cognitive Search
  • Azure Functions
  • Azure Logic Apps
  1. How is Form Recognizer related to OCR?

Azure Form Recognizer is a cloud-based Azure Applied AI Service that is built using optical character recognition (OCR), Text Analytics, and Custom Text from Azure Cognitive Services.

  1. Can I retrain a custom model?

There is no explicit retrain operation in Form Recognizer. Each train action results in the creation of a new model.


2 Responses to “Build A Custom Model Using Azure Form Recognizer-Part 2”

  1. Christian

    Is pretty unusable with a true dynamic table ( from a report for eq ) it only works with tables and keys that are in the same location so what is the advantage over storing somewhere your key box location and applying to another form which is of the same template?

    Reply

Leave a Reply