Skip to content

Commit c7ff010

Browse files
authored
Merge pull request #230385 from MicrosoftDocs/release-preview-form-v3-feb
Release preview form v3 feb-- scheduled release at 10am of 3/13
2 parents a3e19b3 + e5d907a commit c7ff010

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1368
-378
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: Add-on capabilities - Form Recognizer
3+
titleSuffix: Azure Applied AI Services
4+
description: How to increase service limit capacity with add-on capabilities.
5+
author: jaep3347
6+
manager: nitinme
7+
ms.service: applied-ai-services
8+
ms.subservice: forms-recognizer
9+
ms.topic: conceptual
10+
ms.date: 03/03/2023
11+
ms.author: lajanuar
12+
monikerRange: 'form-recog-3.0.0'
13+
recommendations: false
14+
---
15+
<!-- markdownlint-disable MD033 -->
16+
17+
# Azure Form Recognizer add-on capabilities
18+
19+
**This article applies to:** ![Form Recognizer v3.0 checkmark](media/yes-icon.png) **Form Recognizer v3.0**.
20+
21+
> [!NOTE]
22+
>
23+
> Add-on capabilities for Form Recognizer Studio are only available within the Read and Layout models for the `2023-02-28-preview` release.
24+
25+
Form Recognizer now supports more sophisticated analysis capabilities. These optional capabilities can be enabled and disabled depending on the scenario of the document extraction. There are three add-on capabilities available for the `2023-02-28-preview`:
26+
27+
* [`ocr.highResolution`](#high-resolution-extraction)
28+
29+
* [`ocr.formula`](#formula-extraction)
30+
31+
* [`ocr.font`](#font-property-extraction)
32+
33+
## High resolution extraction
34+
35+
The task of recognizing small text from large-size documents, like engineering drawings, is a challenge. Often the text is mixed with other graphical elements and has varying fonts, sizes and orientations. Moreover, the text may be broken into separate parts or connected with other symbols. Form Recognizer now supports extracting content from these types of documents with the `ocr.highResolution` capability. You get improved quality of content extraction from A1/A2/A3 documents by enabling this add-on capability.
36+
37+
## Formula extraction
38+
39+
The `ocr.formula` capability extracts all identified formulas, such as mathematical equations, in the `formulas` collection as a top level object under `content`. Inside `content`, detected formulas are represented as `:formula:`. Each entry in this collection represents a formula that includes the formula type as `inline` or `display`, and its LaTeX representation as `value` along with its `polygon` coordinates. Initially, formulas appear at the end of each page.
40+
41+
> [!NOTE]
42+
> The `confidence` score is hard-coded for the `2023-02-28` public preview release.
43+
44+
```json
45+
"content": ":formula:",
46+
"pages": [
47+
{
48+
"pageNumber": 1,
49+
"formulas": [
50+
{
51+
"kind": "inline",
52+
"value": "\\frac { \\partial a } { \\partial b }",
53+
"polygon": [...],
54+
"span": {...},
55+
"confidence": 0.99
56+
},
57+
{
58+
"kind": "display",
59+
"value": "y = a \\times b + a \\times c",
60+
"polygon": [...],
61+
"span": {...},
62+
"confidence": 0.99
63+
}
64+
]
65+
}
66+
]
67+
```
68+
69+
## Font property extraction
70+
71+
The `ocr.font` capability extracts all font properties of text extracted in the `styles` collection as a top-level object under `content`. Each style object specifies a single font property, the text span it applies to, and its corresponding confidence score. The existing style property is extended with more font properties such as `similarFontFamily` for the font of the text, `fontStyle` for styles such as italic and normal, `fontWeight` for bold or normal, `color` for color of the text, and `backgroundColor` for color of the text bounding box.
72+
73+
```json
74+
"content": "Foo bar",
75+
"styles": [
76+
{
77+
"similarFontFamily": "Arial, sans-serif",
78+
"spans": [ { "offset": 0, "length": 3 } ],
79+
"confidence": 0.98
80+
},
81+
{
82+
"similarFontFamily": "Times New Roman, serif",
83+
"spans": [ { "offset": 4, "length": 3 } ],
84+
"confidence": 0.98
85+
},
86+
{
87+
"fontStyle": "italic",
88+
"spans": [ { "offset": 1, "length": 2 } ],
89+
"confidence": 0.98
90+
},
91+
{
92+
"fontWeight": "bold",
93+
"spans": [ { "offset": 2, "length": 3 } ],
94+
"confidence": 0.98
95+
},
96+
{
97+
"color": "#FF0000",
98+
"spans": [ { "offset": 4, "length": 2 } ],
99+
"confidence": 0.98
100+
},
101+
{
102+
"backgroundColor": "#00FF00",
103+
"spans": [ { "offset": 5, "length": 2 } ],
104+
"confidence": 0.98
105+
}
106+
]
107+
```
108+
109+
## Next steps
110+
111+
> [!div class="nextstepaction"]
112+
> Learn more:
113+
> [**Read model**](concept-read.md) [**Layout model**](concept-layout.md).

articles/applied-ai-services/form-recognizer/concept-business-card.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: applied-ai-services
88
ms.subservice: forms-recognizer
99
ms.topic: conceptual
10-
ms.date: 11/14/2022
10+
ms.date: 03/03/2023
1111
ms.author: lajanuar
1212
recommendations: false
1313
---
@@ -23,7 +23,7 @@ recommendations: false
2323
[!INCLUDE [applies to v2.1](includes/applies-to-v2-1.md)]
2424
::: moniker-end
2525

26-
The Form Recognizer business card model combines powerful Optical Character Recognition (OCR) capabilities with deep learning models to analyze and extract key information from business card images. The API analyzes printed business cards; extracts key information such as first name, last name, company name, email address, and phone number; and returns a structured JSON data representation.
26+
The Form Recognizer business card model combines powerful Optical Character Recognition (OCR) capabilities with deep learning models to analyze and extract data from business card images. The API analyzes printed business cards; extracts key information such as first name, last name, company name, email address, and phone number; and returns a structured JSON data representation.
2727

2828
## Business card data extraction
2929

@@ -48,7 +48,7 @@ Business cards are a great way to represent a business or a professional. The co
4848

4949
::: moniker range="form-recog-3.0.0"
5050

51-
The following tools are supported by Form Recognizer v3.0:
51+
Form Recognizer v3.0 supports the following tools:
5252

5353
| Feature | Resources | Model ID |
5454
|----------|-------------|-----------|
@@ -58,7 +58,7 @@ The following tools are supported by Form Recognizer v3.0:
5858

5959
::: moniker range="form-recog-2.1.0"
6060

61-
The following tools are supported by Form Recognizer v2.1:
61+
Form Recognizer v2.1 supports the following tools:
6262

6363
| Feature | Resources |
6464
|----------|-------------------------|
@@ -68,7 +68,7 @@ The following tools are supported by Form Recognizer v2.1:
6868

6969
### Try business card data extraction
7070

71-
See how data, including name, job title, address, email, and company name, is extracted from business cards. You'll need the following resources:
71+
See how data, including name, job title, address, email, and company name, is extracted from business cards. You need the following resources:
7272

7373
* An Azure subscription—you can [create one for free](https://azure.microsoft.com/free/cognitive-services/)
7474

@@ -125,7 +125,7 @@ See how data, including name, job title, address, email, and company name, is ex
125125

126126
:::image type="content" source="media/fott-select-form-type.png" alt-text="Screenshot of the select-form-type dropdown menu.":::
127127

128-
1. Select **Run analysis**. The Form Recognizer Sample Labeling tool will call the Analyze Prebuilt API and analyze the document.
128+
1. Select **Run analysis**. The Form Recognizer Sample Labeling tool calls the Analyze Prebuilt API and analyze the document.
129129

130130
1. View the results - see the key-value pairs extracted, line items, highlighted text extracted and tables detected.
131131

articles/applied-ai-services/form-recognizer/concept-composed-models.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: applied-ai-services
88
ms.subservice: forms-recognizer
99
ms.topic: conceptual
10-
ms.date: 02/28/2023
10+
ms.date: 03/03/2023
1111
ms.author: lajanuar
1212
recommendations: false
1313
---
@@ -38,7 +38,11 @@ With composed models, you can assign multiple custom models to a composed model
3838

3939
* For ```Custom neural``` models the best practice is to add all the different variations of a single document type into a single training dataset and train on custom neural model. Model compose is best suited for scenarios when you have documents of different types being submitted for analysis.
4040

41-
* Pricing is the same whether you're using a composed model or selecting a specific model. One model analyzes each document. With composed models, the system performs a classification to check which of the composed custom models should be invoked and invokes the single best model for the document.
41+
::: moniker-end
42+
43+
::: moniker range="form-recog-3.0.0"
44+
45+
With the introduction of [****custom classifier models****](./concept-custom-classifier.md), you can choose to use [**composed models**](./concept-composed-models.md) or the classifier model as an explicit step before analysis. For a deeper understanding of when to use a classifier or composed model, _see_ [**Custom classifier models**](concept-custom-classifier.md).
4246

4347
## Compose model limits
4448

@@ -57,7 +61,7 @@ With composed models, you can assign multiple custom models to a composed model
5761

5862
* To compose a model trained with a prior version of the API (v2.1 or earlier), train a model with the v3.0 API using the same labeled dataset. That addition ensures that the v2.1 model can be composed with other models.
5963

60-
* Models composed with v2.1 of the API continue to be supported, requiring no updates.
64+
* Models composed with v2.1 of the API continues to be supported, requiring no updates.
6165

6266
* The limit for maximum number of custom models that can be composed is 100.
6367

@@ -90,4 +94,4 @@ Learn to create and compose custom models:
9094

9195
> [!div class="nextstepaction"]
9296
> [**Build a custom model**](how-to-guides/build-a-custom-model.md)
93-
> [**Compose custom models**](how-to-guides/compose-custom-models.md)
97+
> [**Compose custom models**](how-to-guides/compose-custom-models.md)
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Custom classifier model - Form Recognizer
3+
titleSuffix: Azure Applied AI Services
4+
description: Use the custom classifier model to train a model to identify and split the documents you process within your application.
5+
author: vkurpad
6+
manager: nitinme
7+
ms.service: applied-ai-services
8+
ms.subservice: forms-recognizer
9+
ms.topic: conceptual
10+
ms.date: 03/03/2023
11+
ms.author: lajanuar
12+
ms.custom: references_regions
13+
monikerRange: 'form-recog-3.0.0'
14+
recommendations: false
15+
---
16+
17+
# Custom classifier model
18+
19+
**This article applies to:** ![Form Recognizer v3.0 checkmark](media/yes-icon.png) **Form Recognizer v3.0**.
20+
21+
Custom classifier models are deep-learning-model types that combine layout and language features to accurately detect and identify documents you process within your application. Custom classifier models can classify each page in an input file to identify the document(s) within and can also identify multiple documents or multiple instances of a single document within an input file.
22+
23+
## Model capabilities
24+
25+
Custom classifier models can analyze a single- or multi-file documents to identify if any of the trained document types are contained within an input file. Here are the currently supported scenarios:
26+
27+
* A single file containing one document. For instance, a loan application form.
28+
29+
* A single file containing multiple documents. For instance, a loan application package containing a loan application form, payslip, and bank statement.
30+
31+
* A single file containing multiple instances of the same document. For instance, a collection of scanned invoices.
32+
33+
Training a custom classifier model requires at least two distinct classes and a minimum of five samples per class.
34+
35+
### Compare custom classifier and composed models
36+
37+
A custom classifier model can replace [a composed model](concept-composed-models.md) in some scenarios but there are a few differences to be aware of:
38+
39+
| Capability | Custom classifier process | Composed model process |
40+
|--|--|--|
41+
|Analyze a single document of unknown type belonging to one of the types trained for extraction model processing.| &#9679; Requires multiple calls. </br> &#9679; Call the classifier models based on the document class. This step allows for a confidence-based check before invoking the extraction model analysis.</br> &#9679; Invoke the extraction model. | &#9679; Requires a single call to a composed model containing the model corresponding to the input document type. |
42+
|Analyze a single document of unknown type belonging to several types trained for extraction model processing.| &#9679;Requires multiple calls.</br> &#9679; Make a call to the classifier that ignores documents not matching a designated type for extraction.</br> &#9679; Invoke the extraction model. | &#9679; Requires a single call to a composed model. The service selects a custom model within the composed model with the highest match.</br> &#9679; A composed model can't ignore documents.|
43+
|Analyze a file containing multiple documents of known or unknown type belonging to one of the types trained for extraction model processing.| &#9679; Requires multiple calls. </br> &#9679; Call the extraction model for each identified document in the input file.</br> &#9679; Invoke the extraction model. | &#9679; Requires a single call to a composed model.</br> &#9679; The composed model invokes the component model once on the first instance of the document. </br> &#9679;The remaining documents are ignored. |
44+
45+
## Language support
46+
47+
Classifier models currently only support English language documents.
48+
49+
## Best practices
50+
51+
Custom classifier models require a minimum of five samples per class to train. If the classes are similar, adding extra training samples improves model accuracy.
52+
53+
## Training a model
54+
55+
Custom classifier models are only available in the [v3.0 API](v3-migration-guide.md) starting with API version ```2023-02-28-preview```. [Form Recognizer Studio](https://formrecognizer.appliedai.azure.com/studio) provides a no-code user interface to interactively train a custom classifier.
56+
57+
When using the REST API, if you've organized your documents by folders, you can use the ```azureBlobSource``` property of the request to train a classifier model.
58+
59+
```rest
60+
https://{endpoint}/formrecognizer/documentClassifiers:build?api-version=2023-02-28-preview
61+
62+
{
63+
"classifierId": "demo2.1",
64+
"description": "",
65+
"docTypes": {
66+
"car-maint": {
67+
"azureBlobSource": {
68+
"containerUrl": "SAS URL to container",
69+
"prefix": "sample1/car-maint/"
70+
}
71+
},
72+
"cc-auth": {
73+
"azureBlobSource": {
74+
"containerUrl": "SAS URL to container",
75+
"prefix": "sample1/cc-auth/"
76+
}
77+
},
78+
"deed-of-trust": {
79+
"azureBlobSource": {
80+
"containerUrl": "SAS URL to container",
81+
"prefix": "sample1/deed-of-trust/"
82+
}
83+
}
84+
}
85+
}
86+
87+
```
88+
89+
Alternatively, if you have a flat list of files or only plan to use a few select files within each folder to train the model, you can use the ```azureBlobFileListSource``` property to train the model. This step requires a ```file list``` in [JSON Lines](https://jsonlines.org/) format. For each class, add a new file with a list of files to be submitted for training.
90+
91+
```rest
92+
{
93+
"classifierId": "demo2",
94+
"description": "",
95+
"docTypes": {
96+
"car-maint": {
97+
"azureBlobFileListSource": {
98+
"containerUrl": "SAS URL to container",
99+
"fileList": "sample1/car-maint.jsonl"
100+
}
101+
},
102+
"cc-auth": {
103+
"azureBlobFileListSource": {
104+
"containerUrl": "SAS URL to container",
105+
"fileList": "sample1/cc-auth.jsonl"
106+
}
107+
},
108+
"deed-of-trust": {
109+
"azureBlobFileListSource": {
110+
"containerUrl": "SAS URL to container",
111+
"fileList": "sample1/deed-of-trust.jsonl"
112+
}
113+
}
114+
}
115+
}
116+
117+
```
118+
119+
File list `car-maint.jsonl` contains the following files.
120+
121+
```json
122+
{"file":"sample1/car-maint/Commercial Motor Vehicle - Adatum.pdf"}
123+
{"file":"sample1/car-maint/Commercial Motor Vehicle - Fincher.pdf"}
124+
{"file":"sample1/car-maint/Commercial Motor Vehicle - Lamna.pdf"}
125+
{"file":"sample1/car-maint/Commercial Motor Vehicle - Liberty.pdf"}
126+
{"file":"sample1/car-maint/Commercial Motor Vehicle - Trey.pdf"}
127+
```
128+
129+
## Next steps
130+
131+
Learn to create custom classifier models:
132+
133+
> [!div class="nextstepaction"]
134+
> [**Build a custom classifier model**](how-to-guides/build-a-custom-classifier.md)
135+
> [**Custom models overview**](concept-custom.md)

articles/applied-ai-services/form-recognizer/concept-custom-label-tips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This article highlights the best methods for labeling custom model datasets in t
2121

2222
* The following video is the second of two presentations intended to help you build custom models with higher accuracy (the first presentation explores [How to create a balanced data set](concept-custom-label.md#video-custom-label-tips-and-pointers)).
2323

24-
* Here, we'll examine best practices for labeling your selected documents. With semantically relevant and consistent labeling, you should see an improvement in model performance.</br></br>
24+
* Here, we examine best practices for labeling your selected documents. With semantically relevant and consistent labeling, you should see an improvement in model performance.</br></br>
2525

2626
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE5fZKB ]
2727

0 commit comments

Comments
 (0)