Skip to content

Commit

Permalink
Merge pull request #29 from Azure-Samples/updated-training-docs
Browse files Browse the repository at this point in the history
updated docs
  • Loading branch information
gloveboxes authored May 16, 2024
2 parents 23b59f2 + 06dcb62 commit fa32272
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 33 deletions.
Binary file modified assets/forms/new_patient_information_english.docx
Binary file not shown.
Binary file modified assets/forms/new_patient_information_english.pdf
Binary file not shown.
Binary file not shown.
Binary file added assets/training_labeled/.DS_Store
Binary file not shown.
12 changes: 7 additions & 5 deletions docs/docs/20-create-azure-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ id: create-azure-services

## Deploy Azure services

The following services will be created in your Azure subscription:
The following services will be created in the lab Azure subscription:

1. [Azure AI Document Intelligence](https://azure.microsoft.com/products/ai-services/ai-document-intelligence?WT.mc_id=aiml-77396-cxa).
1. [Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db/introduction?WT.mc_id=aiml-77396-cxa).
Expand All @@ -23,7 +23,7 @@ From the terminal window, run the following commands to create the Azure Patient
1. Authenticate to Azure by running the following command. Note, it may take up to 30 seconds for the `azd login --use-device-code` command to complete.

```bash
azd auth login --use-device-code
azd auth login
```

1. Initialize your Azure environment with the following command.
Expand All @@ -45,16 +45,18 @@ From the terminal window, run the following commands to create the Azure Patient
:::note
It will take approximately 5 to 10 minutes to deploy the Azure services. So now is a great time to grab a cup of coffee or tea or read the next section of the workshop documentation.
<!-- It will take approximately 5 to 10 minutes to deploy the Azure services. So, now is a great time to grab a cup of coffee or tea or read the next section of the workshop documentation. -->
It will take approximately 5 minutes to deploy the Azure services. So, now is a great time to read the next section of the workshop documentation.
:::
:::tip
<!-- :::tip
- You can only have one free Azure AI Document Intelligence service in your Azure subscription.
- If your azd environment fails to deploy, you can delete the environment by deleting the `.azure` folder in the `contoso_new_patient_app` folder.
:::
::: -->
1. The output from the `azd up` command will look similar to the following.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ To train a custom model, you need to provide a set of labeled training documents

You need at least five examples of a document type to train a custom model. For example, if you want to recognize receipts, you'd need five labeled receipts examples.

## Custom model types
<!-- ## Custom model types
Custom models can be one of two types, [**custom template**](https://docs.microsoft.com/azure/applied-ai-services/form-recognizer/concept-custom-template?WT.mc_id=aiml-77396-cxa) or custom form and [**custom neural**](https://docs.microsoft.com/azure/applied-ai-services/form-recognizer/concept-custom-neural?WT.mc_id=aiml-77396-cxa) or custom document models. The labeling and training process for both models is identical, but the models differ as follows:
Custom models can be one of two types, [**custom template**](https://docs.microsoft.com/azure/applied-ai-services/form-recognizer/concept-custom-template?WT.mc_id=aiml-77396-cxa) or custom form and [**custom neural**](https://docs.microsoft.com/azure/applied-ai-services/form-recognizer/concept-custom-neural?WT.mc_id=aiml-77396-cxa) or custom document models. -->
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This topic describes how to upload your training data to [Document Intelligence

## New patient registration form

In this workshop, you'll create a _custom template model_ to recognize the fields in the new patient registration form. There are five forms in the training set, and each form contains the same fields, four of these forms have been labeled, the fifth form is unlabeled. As part of this workshop, you'll label the fifth form.
In this workshop, you'll create a _custom template model_ to recognize the fields in the new patient registration form. There are six forms in the training set, and each form contains the same fields, five of these forms have been labeled, the sixth form is partially labeled. As part of this workshop, you'll finish labeling the sixth form.

This workshop includes a *New Patient Registration Form* and matching label data you need to upload to an Azure storage container.
This workshop includes a _New Patient Registration Form_ and matching label data you need to upload to an Azure storage container.

The label data describes the location of the fields on the forms and was created for the workshop using Document Intelligence Studio. The label data is in a JSON file that is named the same as the form file. For example, the label data for the form named `form1.pdf` is in the file named `form1.pdf.json`. The label data is in the same folder as the form files.

Expand Down Expand Up @@ -60,15 +60,15 @@ Upload the *New Patient Registration Form* and matching label data to the storag
5. Select the `trainingdata` container
6. On the **trainingdata** page, select **Upload**.
7. On the **Upload blob** page, select **Browse for files**.
8. From the **file manager** dialog, select **all** the files from the `contoso_new_patient_assets/training_labeled/<Language_folder>` folder you cloned to your computer.
8. From the **file manager** dialog, select **all** the files from the `workshop/training_labeled/assets/english` folder you cloned to your computer.

:::note

The new patient registration form has been localized into several languages. Select the folder that matches the language you want to use for the workshop.

:::

9. Select **Open**.
9. Select **Open**.
10. Select **Upload**.
11. Close the **Upload blob** dialog.
12. Leave the Azure portal open in a browser tab.
18 changes: 10 additions & 8 deletions docs/docs/25-form-recognizer-studio/40-label-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ The following steps will show you how to label your data.

<!-- The document language will match the folder of documents you uploaded to your Azure Storage Account. For example, if you uploaded the English folder, the document language will be English. -->

1. Select the document named _sample.pdf_.
1. Select the document named _Complete_Me.pdf_.
2. Select `Run layout` the document will analyze and then open the document for labeling.
3. Select the ISO language code for the document. You'll find this field in the top right-hand corner of the document, then from the list of labels, select **iso**.
4. Now repeat this labeling process for all the fields in the document. See the tables below for the list of form fields and their associated labels for:
3. The form will be displayed in the document viewer. In the interests of time, most of the fields in the form have already been labeled. You need to label the remaining fields in the form.
4. Select _Smith_, then from the list of labels, select **family_name**.
5. Select _Alex_, then from the list of labels, select **given_names**.
<!-- 4. Now repeat this labeling process for all the fields in the document. See the tables below for the list of form fields and their associated labels for:
- [English Labels](#english-labels),
- [Etiquetas Españolas](#etiquetas-españolas),
- [Etiquetas Portuguêsas ](#etiquetas-portuguêsas), and
- [普通话标签](#普通话标签).
- [普通话标签](#普通话标签). -->

:::note

Expand All @@ -43,7 +45,7 @@ You can filter the list of labels by typing the label name in the list of labels
- [Etiquetas Portuguêsas ](#etiquetas-portuguêsas)
- [普通话标签](#普通话标签) -->

## English Labels
<!-- ## English Labels
![This image is the english registration form](./img/new_patient_form.png)
Expand Down Expand Up @@ -79,9 +81,9 @@ You can filter the list of labels by typing the label name in the list of labels
| Reaction row 3 | reaction_3 |
| date | date |
You now have all the documents in your dataset labeled. If you look at the storage account, you'll find a _.labels.json_ and _.ocr.json_ files that correspond to each document in your training dataset and a new fields.json file. This training dataset will be submitted to train the model.
You now have all the documents in your dataset labeled. If you look at the storage account, you'll find a _.labels.json_ and _.ocr.json_ files that correspond to each document in your training dataset and a new fields.json file. This training dataset will be submitted to train the model. -->

## Etiquetas Españolas
<!-- ## Etiquetas Españolas
![This image is the spanish registration form](./img/new_patient_form_spanish.png)
Expand Down Expand Up @@ -156,7 +158,7 @@ Ahora tiene todos los documentos en su conjunto de datos etiquetados. Si observa
| Linha de reação 3 | reaction_3 |
| Data| Date |
Agora você tem todos os documentos em seu conjunto de dados rotulados. Se você observar a conta de armazenamento, encontrará arquivos .labels.json e .ocr.json que correspondem a cada documento em seu conjunto de dados de treinamento e um novo arquivo fields.json. Este conjunto de dados de treinamento será enviado para treinar o modelo
Agora você tem todos os documentos em seu conjunto de dados rotulados. Se você observar a conta de armazenamento, encontrará arquivos .labels.json e .ocr.json que correspondem a cada documento em seu conjunto de dados de treinamento e um novo arquivo fields.json. Este conjunto de dados de treinamento será enviado para treinar o modelo -->

<!-- ## 普通话标签
Expand Down
22 changes: 12 additions & 10 deletions docs/docs/30-create-new-patient-app/20-upload-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,32 @@

Complete a new patient registration form and upload it to the patient registration app.

## Open the new patient registration form
<!-- ## Open the new patient registration form
You can print the document and then fill it out by hand, or you can open the document in a PDF reader and edit the document.
You can print the document and then fill it out by hand, or you can open the document in a PDF reader and edit the document.
Use the `contoso_new_patient_assets/forms/new_patient_information_<language>.pdf` document that matches the language you used to label and train the model in Document Intelligence Studio.
Use the `workshop/assets/forms/new_patient_information_english.pdf` document that matches the language you used to label and train the model in Document Intelligence Studio. -->

### Fill out the form by hand
<!-- ### Fill out the form by hand
1. Print the form and fill it out by hand.
1. From your mobile device, using the patient registration app, take a picture of the completed form and upload the registration form.
1. The patient registration app will extract the patient information from the form and display the information in the app.
1. Confirm the information is correct and click the **Submit** button.
1. Confirm the information is correct and click the **Submit** button. -->

### Edit the form in a PDF reader
## Edit the form using the Edge browser

1. Open the `contoso_new_patient_assets/forms/new_patient_information.pdf` file in a PDF reader.
1. Complete the form using the edit tools in the PDF reader.
1. Save the file.
1. Navigate to the the `workshop/assets/forms` folder.
1. Right mouse click the `new_patient_information_english.pdf` file and open with the Microsoft Edge browser.
1. Select the **Add text** tool in the browser.
1. Complete the form by adding your family name and given names.
1. Select the **Save icon** to save the file.

## Upload the registration form

1. Upload the file to the patient registration app you deployed in the previous section.
1. The patient registration app will extract the patient information from the form and display the information in the app.
1. Confirm the information is correct and click the **Upload** button.
1. Confirm the information is correct and click the **Upload** button.

![The gif shows the process of uploading a form](./img/basic-workflow.gif)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
<!-- ---
pagination_prev: install-prerequisites
pagination_next: create-azure-services
---
--- -->

# Azure Container Instance

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/_17-install-prerequisites/_20-dev-containers.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
<!-- ---
pagination_prev: install-prerequisites
pagination_next: create-azure-services
---
--- -->

# Docker Dev Containers

Expand Down
File renamed without changes.

0 comments on commit fa32272

Please sign in to comment.