You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-21Lines changed: 42 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
page_type: sample
3
3
languages:
4
-
- python
5
-
- bicep
4
+
- python
5
+
- bicep
6
6
products:
7
-
- azure
8
-
- ai-services
9
-
- azure-openai
7
+
- azure
8
+
- ai-services
9
+
- azure-openai
10
10
name: Document Processing with Azure AI Samples
11
11
description: This collection of samples demonstrates how to use various Azure AI capabilities to build solution to extract structured data, classify, and analyze documents.
12
12
---
@@ -27,6 +27,9 @@ The techniques demonstrated take advance of various capabilities from each servi
27
27
28
28
-[Samples](#samples)
29
29
-[Getting Started](#getting-started)
30
+
-[Setup on GitHub Codespaces](#setup-on-github-codespaces)
31
+
-[Setup on Local](#setup-on-local)
32
+
-[Deploy the Azure environment](#deploy-the-azure-environment)
30
33
-[Contributing](#contributing)
31
34
-[License](#license)
32
35
@@ -35,38 +38,53 @@ The techniques demonstrated take advance of various capabilities from each servi
35
38
> [!NOTE]
36
39
> All data extraction samples provide both an accuracy and confidence score for the extracted data. The accuracy score is calculated based on the similarity between the extracted data and the ground truth data. The confidence score is calculated based on OCR analysis confidence and `logprobs` in Azure OpenAI requests.
|[Data Extraction - Azure AI Document Intelligence + Azure OpenAI GPT-4o](./samples/extraction/text-based/document-intelligence-openai.ipynb)| Demonstrates how to use Azure AI Document Intelligence pre-built layout and Azure OpenAI GPT models to extract structured data from documents. | Predominantly text-based documents such as invoices, receipts, and forms. |
41
-
|[Data Extraction - Azure AI Document Intelligence + Phi-3.5 MoE](./samples/extraction/text-based/document-intelligence-phi.ipynb)| Demonstrates how to use Azure AI Document Intelligence pre-built layout and Microsoft's Phi-3 models to extract structured data from documents. | Predominantly text-based documents such as invoices, receipts, and forms. |
42
-
|[Data Extraction - Marker/Surya + Azure OpenAI GPT-4o](./samples/extraction/text-based/marker-surya-openai.ipynb)| Demonstrates how to use Marker/Surya and Azure OpenAI GPT models to extract structured data from documents. | Predominantly text-based documents such as invoices, receipts, and forms. |
43
-
|[Data Extraction - Azure OpenAI GPT-4o with Vision](./samples/extraction/vision-based/openai.ipynb)| Demonstrates how to use Azure OpenAI GPT-4o and GPT-4o-mini models to extract structured data from documents using their built-in vision capabilities. | Complex documents with a mix of text and images, including diagrams, signatures, selection marks, etc. such as reports and contracts. |
44
-
|[Data Extraction - Comprehensive Azure AI Document Intelligence + Azure OpenAI GPT-4o with Vision](./samples/extraction/vision-based/comprehensive.ipynb)| Demonstrates how to improve the accuracy and confidence in extracting structured data from documents by combining Azure AI Document Intelligence and Azure OpenAI GPT-4o models with vision capabilities. | Any structured or unstructured document type. |
45
-
|[Classification - Azure OpenAI GPT-4o with Vision](./samples/classification/openai.ipynb)| Demonstrates how to use Azure OpenAI GPT-4o and GPT-4o-mini models to classify documents using their built-in vision capabilities. | Processing multiple documents types or documents with varying purposes, such as contracts, legal documents, and emails. |
46
-
|[Classification - Azure AI Document Intelligence + Embeddings](./samples/classification/document-intelligence-embeddings.ipynb)| Demonstrates how to use Azure AI Document Intelligence pre-built layout and embeddings models to classify documents based on their content. | Processing multiple documents types or documents with varying purposes, such as contracts, legal documents, and emails. |
|[Data Extraction - Azure AI Document Intelligence + Azure OpenAI GPT-4o](./samples/extraction/text-based/document-intelligence-openai.ipynb)| Demonstrates how to use Azure AI Document Intelligence pre-built layout and Azure OpenAI GPT models to extract structured data from documents. | Predominantly text-based documents such as invoices, receipts, and forms.|
44
+
|[Data Extraction - Azure AI Document Intelligence + Phi-3.5 MoE](./samples/extraction/text-based/document-intelligence-phi.ipynb)| Demonstrates how to use Azure AI Document Intelligence pre-built layout and Microsoft's Phi-3 models to extract structured data from documents. | Predominantly text-based documents such as invoices, receipts, and forms.|
45
+
|[Data Extraction - Marker/Surya + Azure OpenAI GPT-4o](./samples/extraction/text-based/marker-surya-openai.ipynb)| Demonstrates how to use Marker/Surya and Azure OpenAI GPT models to extract structured data from documents. | Predominantly text-based documents such as invoices, receipts, and forms.|
46
+
|[Data Extraction - Azure OpenAI GPT-4o with Vision](./samples/extraction/vision-based/openai.ipynb)| Demonstrates how to use Azure OpenAI GPT-4o and GPT-4o-mini models to extract structured data from documents using their built-in vision capabilities.| Complex documents with a mix of text and images, including diagrams, signatures, selection marks, etc. such as reports and contracts. |
47
+
|[Data Extraction - Comprehensive Azure AI Document Intelligence + Azure OpenAI GPT-4o with Vision](./samples/extraction/vision-based/comprehensive.ipynb)| Demonstrates how to improve the accuracy and confidence in extracting structured data from documents by combining Azure AI Document Intelligence and Azure OpenAI GPT-4o models with vision capabilities. | Any structured or unstructured document type. |
48
+
|[Classification - Azure OpenAI GPT-4o with Vision](./samples/classification/openai.ipynb)| Demonstrates how to use Azure OpenAI GPT-4o and GPT-4o-mini models to classify documents using their built-in vision capabilities. | Processing multiple documents types or documents with varying purposes, such as contracts, legal documents, and emails.|
49
+
|[Classification - Azure AI Document Intelligence + Embeddings](./samples/classification/document-intelligence-embeddings.ipynb)| Demonstrates how to use Azure AI Document Intelligence pre-built layout and embeddings models to classify documents based on their content. | Processing multiple documents types or documents with varying purposes, such as contracts, legal documents, and emails.|
47
50
48
51
## Getting Started
49
52
50
-
The sample repository comes with a [**Dev Container**](./.devcontainer/README.md) that contains all the necessary tools and dependencies to run the sample. To use the Dev Container, you need to have the following tools installed on your local machine:
53
+
The sample repository comes with a [**Dev Container**](./.devcontainer/README.md) that contains all the necessary tools and dependencies to run the sample.
54
+
55
+
> [!IMPORTANT]
56
+
> An Azure subscription is required to run these samples. If you don't have an Azure subscription, create an [account](https://azure.microsoft.com/en-us/).
57
+
58
+
### Setup on GitHub Codespaces
59
+
60
+
To use the Dev Container in GitHub Codespaces, follow these steps:
61
+
62
+
1. Click on the `Code` button in the repository and select `Codespaces`.
63
+
2. Click on the **+** button to create a new Codespace using the provided `.devcontainer\devcontainer.json` configuration.
64
+
3. Once the Codespace is created, continue to the [Azure environment setup](#deploy-the-azure-environment) section.
65
+
66
+
### Setup on Local
67
+
68
+
To use the Dev Container, you need to have the following tools installed on your local machine:
51
69
52
70
- Install [**Visual Studio Code**](https://code.visualstudio.com/download)
- Install [**Remote - Containers**](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for Visual Studio Code
55
73
56
-
Additionally, you will require:
57
-
58
-
- An Azure subscription. If you don't have an Azure subscription, create an [account](https://azure.microsoft.com/en-us/).
59
-
60
74
To setup a local development environment, follow these steps:
61
75
62
-
> [!NOTE]
76
+
> [!IMPORTANT]
63
77
> Ensure that Docker Desktop is running on your local machine.
64
78
65
79
1. Clone the repository to your local machine.
66
80
2. Open the repository in Visual Studio Code.
67
81
3. Press `F1` to open the command palette and type `Dev Containers: Reopen in Container`.
68
82
69
-
Once the Dev Container is up and running, you can setup the necessary Azure services and run the [samples](#samples) in the repository by running the following command in VS Code's `pwsh` terminal:
83
+
Once the Dev Container is up and running, continue to the [Azure environment setup](#deploy-the-azure-environment) section.
84
+
85
+
### Deploy the Azure environment
86
+
87
+
Once the Dev Container is up and running, you can setup the necessary Azure services and run the [samples](#samples) in the repository by running the following command in a `pwsh` terminal:
70
88
71
89
> [!NOTE]
72
90
> For the most optimal sample experience, it is recommended to run the samples in `East US` which will provide support for all the services used in the samples. Find out more about region availability for [Azure AI Document Intelligence](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/concept-layout?view=doc-intel-4.0.0&tabs=sample-code), and [`GPT-4o`](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#standard-and-global-standard-deployment-model-quota), [`Phi-3.5 MoE`](https://azure.microsoft.com/en-us/pricing/details/phi-3/), and [`text-embedding-3-large`](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#standard-deployment-model-availability) models.
> If a specific tenant is required, use the `--tenant <TenantId>` parameter in the `az login` command.
100
+
80
101
The script will deploy the following resources to your Azure subscription:
81
102
82
103
-[**Azure AI Studio Hub & Project**](https://learn.microsoft.com/en-us/azure/ai-studio/what-is-ai-studio), a development platform for building AI solutions that integrates with Azure AI Services in a secure manner using Microsoft Entra ID for authentication.
0 commit comments