Skip to content

Commit ea884a6

Browse files
authored
Merge pull request #108470 from erhopf/formre-deploy-label-update-318
[CogSvcs] Improve Deploy Labeling Tool Docs
2 parents 8b1d9d5 + 6d8f14d commit ea884a6

File tree

6 files changed

+97
-16
lines changed

6 files changed

+97
-16
lines changed

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

Lines changed: 97 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,117 @@ author: PatrickFarley
66
manager: nitinme
77
ms.service: cognitive-services
88
ms.subservice: forms-recognizer
9-
ms.topic: conceptual
10-
ms.date: 02/28/2020
9+
ms.topic: how-to
10+
ms.date: 03/20/2020
1111
ms.author: pafarley
1212
---
1313

1414
# Deploy the sample labeling tool
1515

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.
16+
The Form Recognizer sample labeling tool is an application that provides a simple user interface (UI), which you can use to manually label forms (documents) for the purpose of supervised learning. In this article, we'll provide links and instructions that teach you how to:
1717

18-
This guide will explain alternate ways you can deploy and run the sample labeling tool.
18+
* [Run the sample labeling tool locally](#run-the-sample-labeling-tool-locally)
19+
* [Deploy the sample labeling tool to an Azure Container Instance (ACI)](#deploy-with-azure-container-instances-aci)
20+
* [Use and contribute to the open-source OCR Form Labeling Tool](#open-source-on-github)
1921

20-
## Deploy with Azure Container Instances
22+
## Run the sample labeling tool locally
2123

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
24+
The fastest way to start labeling data is to run the sample labeling tool locally. The following quickstart uses the Form Recognizer REST API and the sample labeling tool to train a custom model with manually labeled data.
2525

26-
On the next page, fill in the following fields for the Docker container setup:
26+
* [Quickstart: Label forms, train a model, and analyze a form using the sample labeling tool](./quickstarts/label-tool.md).
2727

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
28+
## Deploy with Azure Container Instances (ACI)
3229

33-
The steps that follow are optional. Once your app has finished deploying, you can run it and access the label tool online.
30+
Before we get started, it's important to note that there are two ways to deploy the sample labeling tool to an Azure Container Instance (ACI). Both options are used to run the sample labeling tool with ACI:
31+
32+
* [Using the Azure portal](#azure-portal)
33+
* [Using the Azure CLI](#azure-cli)
34+
35+
### Azure portal
36+
37+
Follow these steps to create a new resource using the Azure portal:
38+
39+
1. Sign in to the [Azure portal](https://portal.azure.com/signin/index/).
40+
2. Select **Create a resource**.
41+
3. Next, select **Web App**.
42+
43+
> [!div class="mx-imgBorder"]
44+
> ![Select web app](./media/quickstarts/formre-create-web-app.png)
45+
46+
4. First, make sure that the **Basics** tab is selected. Now, you're going to need to provide some information:
47+
48+
> [!div class="mx-imgBorder"]
49+
> ![Select Basics](./media/quickstarts/formre-select-basics.png)
50+
* Subscription - Select an existing Azure subscription
51+
* Resource Group - You can reuse an existing resource group or create a new one for this project. Creating a new resource group is recommended.
52+
* Name - Give your web app a name.
53+
* Publish - Select **Docker Container**
54+
* Operating System - Select **Linux**
55+
* Region - Choose a region that makes sense for you.
56+
* Linux Plan - Select a pricing tier/plan for your app service.
57+
58+
> [!div class="mx-imgBorder"]
59+
> ![Configure your web app](./media/quickstarts/formre-select-docker-linux.png)
60+
61+
5. Next, select the **Docker** tab.
62+
63+
> [!div class="mx-imgBorder"]
64+
> ![Select Docker](./media/quickstarts/formre-select-docker.png)
65+
66+
6. Now let's configure your Docker container. All fields are required unless otherwise noted:
67+
68+
* Options - Select **Single Container**
69+
* Image Source - Select **Private Registry**
70+
* Server URL - Set this to `https://mcr.microsoft.com`
71+
* Username (Optional) - Create a username.
72+
* Password (Optional) - Create a secure password that you'll remember.
73+
* Image and tag - Set this to `mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool:latest`
74+
* Startup command - Set this to `./run.sh eula=accept`
75+
76+
> [!div class="mx-imgBorder"]
77+
> ![Configure Docker](./media/quickstarts/formre-configure-docker.png)
78+
79+
7. That's it. Next, select **Review + Create**, then **Create** to deploy your web app. When complete, you can access your web app at the URL provided in the **Overview** for your resource.
80+
81+
> [!NOTE]
82+
> When creating your web app, you can also configure authorization/authentication. This is not necessary to get started.
83+
84+
### Azure CLI
85+
86+
As an alternative to using the Azure portal, you can create a resource using the Azure CLI. Before you continue, you'll need to install the [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest). You can skip this step if you're already working with the Azure CLI.
87+
88+
There's a few things you need know about this command:
89+
90+
* `DNS_NAME_LABEL=aci-demo-$RANDOM` generates a random DNS name.
91+
* This sample assumes that you have a resource group that you can use to create a resource. Replace `<resource_group_name>` with a valid resource group associated with your subscription.
92+
* You'll need to specify where you want to create the resource. Replace `<region name>` with your desired region for the web app.
93+
* This command automatically accepts EULA.
94+
95+
From the Azure CLI, run this command to create a web app resource for the sample labeling tool:
96+
97+
```azurecli
98+
DNS_NAME_LABEL=aci-demo-$RANDOM
99+
100+
az container create \
101+
--resource-group <resorunce_group_name> \
102+
--name <name> \
103+
--image mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool \
104+
--ports 3000 \
105+
--dns-name-label $DNS_NAME_LABEL \
106+
--location <region name> \
107+
--cpu 2 \
108+
--memory 8
109+
--command-line "./run.sh eula=accept"
110+
```
34111

35112
### Connect to Azure AD for authorization
36113

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.
114+
It's recommended that you connect your web app to Azure Active Directory. This ensures that only users with valid credentials can sign in and use your web app. Follow the instructions in [Configure your App Service app](https://docs.microsoft.com/azure/app-service/configure-authentication-provider-aad) to connect to Azure Active Directory.
115+
116+
## Open source on GitHub
117+
118+
The OCR Form Labeling Tool is also available as an open-source project on GitHub. The tool is a web application built using React + Redux, and is written in TypeScript. To learn more or contribute, see [OCR Form Labeling Tool](https://github.com/microsoft/OCR-Form-Tools/blob/master/README.md).
38119

39120
## Next steps
40121

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.
122+
Use the [Train with labels](./quickstarts/label-tool.md) quickstart to learn how to use the tool to manually label training data and perform supervised learning.
54.4 KB
Loading
112 KB
Loading
30.6 KB
Loading
29.1 KB
Loading
24.7 KB
Loading

0 commit comments

Comments
 (0)