Skip to content

Commit a35a74e

Browse files
Merge pull request #106101 from PatrickFarley/formre-updates
[cog serv] Formre updates
2 parents 0c43844 + 6b22cfd commit a35a74e

File tree

5 files changed

+69
-13
lines changed

5 files changed

+69
-13
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: How to deploy the Form Recognizer sample labeling tool
3+
titleSuffix: Azure Cognitive Services
4+
description: Learn the different ways you can deploy the Form Recognizer sample labeling tool to help with supervised learning.
5+
author: PatrickFarley
6+
manager: nitinme
7+
ms.service: cognitive-services
8+
ms.subservice: forms-recognizer
9+
ms.topic: conceptual
10+
ms.date: 02/28/2020
11+
ms.author: pafarley
12+
---
13+
14+
# Deploy the sample labeling tool
15+
16+
The Form Recognizer sample labeling tool is an application that runs in a Docker container. It provides a helpful UI that you can use to manually label form documents for the purpose of supervised learning. The [Train with labels](./quickstarts/label-tool.md) quickstart shows you how to run the tool on your local computer, which is the most common scenario.
17+
18+
This guide will explain alternate ways you can deploy and run the sample labeling tool.
19+
20+
## Deploy with Azure Container Instances
21+
22+
You can run the label tool in a Docker web app container. First, [create a new Web App resource](https://ms.portal.azure.com/#create/Microsoft.WebSite) on the Azure portal. Fill in the form with your subscription and resource group details. Enter the following information in the required fields:
23+
* **Publish**: Docker Container
24+
* **Operating** System: Linux
25+
26+
On the next page, fill in the following fields for the Docker container setup:
27+
28+
* **Options**: Single Container
29+
* **Image Source**: Azure Container Registry
30+
* **Access Type**: public
31+
* **Image and tag**: mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool:latest
32+
33+
The steps that follow are optional. Once your app has finished deploying, you can run it and access the label tool online.
34+
35+
### Connect to Azure AD for authorization
36+
37+
We recommend to connect your web app to Azure Active Director (AAD) so that only someone with your credentials can sign in and use the app. Follow the instructions in [Configure your App Service app](https://docs.microsoft.com/azure/app-service/configure-authentication-provider-aad) to connect to AAD.
38+
39+
## Next steps
40+
41+
Return to the [Train with labels](./quickstarts/label-tool.md) quickstart to learn how to use the tool to manually label training data and do supervised learning.

articles/cognitive-services/form-recognizer/includes/create-resource.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.date: 06/12/2019
77
ms.author: pafarley
88
---
99

10-
Go to the Azure Portal and [create a new Form Recognizer resource](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesFormRecognizer). In the **Create** pane, provide the following information:
10+
Go to the Azure portal and <a href="https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesFormRecognizer" title="Create a new Form Recognizer resource" target="_blank">create a new Form Recognizer resource <span class="docon docon-navigate-external x-hidden-focus"></span></a>. In the **Create** pane, provide the following information:
1111

1212
| | |
1313
|--|--|
@@ -20,4 +20,4 @@ Go to the Azure Portal and [create a new Form Recognizer resource](https://ms.po
2020
> [!IMPORTANT]
2121
> Normally when you create a Cognitive Service resource in the Azure portal, you have the option to create a multi-service subscription key (used across multiple cognitive services) or a single-service subscription key (used only with a specific cognitive service). However, because Form Recognizer is a preview release, it is not included in the multi-service subscription, and you cannot create the single-service subscription unless you use the link provided in the Welcome email.
2222
23-
When your Form Recognizer resource finishes deploying, find and select it from the **All resources** list in the portal. Then select the **Quick start** tab to view your subscription data. Save the values of **Key1** and **Endpoint** to a temporary location. You'll use them in the following steps.
23+
When your Form Recognizer resource finishes deploying, find and select it from the **All resources** list in the portal. Then select the **Quick start** tab to view your subscription data. Save the values of **Key1** and **Endpoint** to a temporary location. You'll use them in the following steps.

articles/cognitive-services/form-recognizer/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
description: Azure Form Recognizer is a cognitive service that uses machine learning technology to identify and extract key-value pairs and table data from form documents. It then outputs structured data that includes the relationships in the original file. Unsupervised learning allows the model to understand the layout and field data without manual data labeling or intensive coding. You can also do supervised learning with manually labeled data. Models trained with labeled data can perform better and can work with more complicated documents. # Required; article description that is displayed in search results. < 160 chars.
99
services: cognitive-services
1010
ms.service: cognitive-services #Required; service per approved list. service slug assigned to your service by ACOM.
11-
ms.subservice: form-recognizer
11+
ms.subservice: forms-recognizer
1212
ms.topic: landing-page # Required
1313
author: PatrickFarley #Required; your GitHub user alias, with correct capitalization.
1414
ms.author: pafarley #Required; microsoft alias of author; optional team alias.

articles/cognitive-services/form-recognizer/quickstarts/label-tool.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,19 @@ To complete this quickstart, you must have:
3131
## Set up the sample labeling tool
3232

3333
You'll use the Docker engine to run the sample labeling tool. Follow these steps to set up the Docker container. For a primer on Docker and container basics, see the [Docker overview](https://docs.docker.com/engine/docker-overview/).
34-
1. First, install Docker on a host computer. The host computer can be your local computer ([Windows](https://docs.docker.com/docker-for-windows/), [macOS](https://docs.docker.com/docker-for-mac/), or [Linux](https://docs.docker.com/install/)). Or, you can use a Docker hosting service in Azure, such as the [Azure Kubernetes Service](https://docs.microsoft.com/azure/aks/index), [Azure Container Instances](https://docs.microsoft.com/azure/container-instances/index), or a Kubernetes cluster [deployed to an Azure Stack](https://docs.microsoft.com/azure-stack/user/azure-stack-solution-template-kubernetes-deploy?view=azs-1910). The host computer must meet the following hardware requirements:
34+
1. First, install Docker on a host computer. This guide will show you how to use local computer as a host. If you want to use a Docker hosting service in Azure, see the [Deploy the sample labeling tool](../deploy-label-tool.md) how-to guide.
35+
36+
The host computer must meet the following hardware requirements:
3537

3638
| Container | Minimum | Recommended|
3739
|:--|:--|:--|
3840
|Sample labeling tool|2 core, 4-GB memory|4 core, 8-GB memory|
39-
41+
42+
Install Docker on your machine by following the appropriate instructions for your operating system:
43+
* [Windows](https://docs.docker.com/docker-for-windows/)
44+
* [macOS](https://docs.docker.com/docker-for-mac/)
45+
* [Linux](https://docs.docker.com/install/).
46+
4047
1. Get the sample labeling tool container with the `docker pull` command.
4148
```
4249
docker pull mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool
@@ -112,17 +119,23 @@ Click **Run OCR on all files** on the left pane to get the text layout informati
112119
113120
### Apply labels to text
114121
115-
Next, you'll create labels and apply them to the text elements that you want the model to recognize.
122+
Next, you'll create tags (labels) and apply them to the text elements that you want the model to recognize.
116123
117-
1. First, use the tags editor pane to create the tags (labels) you'd like to identify.
124+
1. First, use the tags editor pane to create the tags you'd like to identify.
125+
1. Click **+** to create a new tag.
126+
1. Enter the tag name.
127+
1. Press Enter to save the tag.
118128
1. In the main editor, click and drag to select one or multiple words from the highlighted text elements.
129+
1. Click on the tag you want to apply, or press the corresponding keyboard key. The number keys are assigned as hotkeys for the first 10 tags. You can reorder your tags using the up and down arrow icons in the tag editor pane.
130+
> [!Tip]
131+
> Keep the following tips in mind when you're labeling your forms.
132+
> * You can only apply one tag to each selected text element.
133+
> * Each tag can only be applied once per page. If a value appears multiple times on the same form, create different tags for each instance. For example: "invoice# 1", "invoice# 2" and so on.
134+
> * Tags cannot span across pages.
135+
> * Label values as they appear on the form; don't try to split a value into two parts with two different tags. For example, an address field should be labeled with a single tag even if it spans multiple lines.
136+
> * Don't include keys in your tagged fields&mdash;only the values.
137+
> * Table data should be detected automatically and will be available in the final output JSON file. However, if the model fails to detect all of your table data, you can manually tag these fields as well. Tag each cell in the table with a different label. If your forms have tables with varying numbers of rows, make sure you tag at least one form with the largest possible table.
119138
120-
> [!NOTE]
121-
> You cannot currently select text that spans across multiple pages.
122-
1. Click on the tag you want to apply, or press corresponding keyboard key. You can only apply one tag to each selected text element, and each tag can only be applied once per page.
123-
124-
> [!TIP]
125-
> The number keys are assigned as hotkeys for the first ten tags. You can reorder your tags using the up and down arrow icons in the tag editor pane.
126139
127140
Follow the above steps to label five of your forms, and then move on to the next step.
128141

articles/cognitive-services/form-recognizer/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
items:
4747
- name: Build a training data set
4848
href: build-training-data-set.md
49+
- name: Deploy the sample labeling tool
50+
href: deploy-label-tool.md
4951
- name: Use containers
5052
items:
5153
- name: Install and run containers

0 commit comments

Comments
 (0)