Form processing identifies the structure of your documents based on examples you provide to extract text from any matching form. Examples might include tax forms or invoices.
In this lab we will build and train a model for recognizing invoices. Then we will build a tablet app to show the detection in action and digitize the content.
Note: If you are building the first model in an environment, click on Explore Templates to get started.
- From the left navigation expand AI Builder and select Build. Select Form Processing.
- Name your model. Because you are working in a shared environment make sure to include your name as part of the model name. This will make it easier to find later. Click create.
- Your screen should look like the following image. Select Add documents.
- Add the documents from the Train folder. You must have at least five documents to train the model. You can find these documents here
Confirm the selection and click Upload.
Once your uploads are complete, select Analyze.
Select the fields.
- Hover over the highlighted fields and confirm the fields that should be returned by the form when processing from our trained model.
- Once you have confirmed the fields, click Done.
- Train your model.
- Locate and open your saved model. If you need help finding it, type your name into the search box.
- Review the results of the trained model.
- Perform a test with the test invoice.
- Perform a test with another image or document.
- Publish the model.
- Navigate to Apps and create a new Canvas App. Select Blank app with a tablet layout.
- Insert the Form Processor control from the AI Builder.
- Map it to your saved model.
- Drag and resize the control like the image below.
- Play your app.
- Click Analyze and add your test file.
- Your uploaded form will be analyzed
- You can see the mapped fields are recognized.
- Close the app player.
- Let’s take some of the data fields and place them on the screen for the user to review. Add three labels to the screen. Drag them to the right side of the screen and line them up like in the image below. Edit the text to “Invoice Number” , “Due Date” , and “Total”.
- Add Text input fields for each row and place them as below.
Now we will map data from the analyzed document. Edit the default values for each field as follows:
- Play the app and add an invoice to be analyzed.