Document Intelligence receipt model
Important
- Document Intelligence public preview releases provide early access to features that are in active development. Features, approaches, and processes may change, prior to General Availability (GA), based on user feedback.
- The public preview version of Document Intelligence client libraries default to REST API version 2024-07-31-preview.
- Public preview version 2024-07-31-preview is currently only available in the following Azure regions. Note that the custom generative (document field extraction) model in AI Studio is only available in North Central US region:
- East US
- West US2
- West Europe
- North Central US
This content applies to: v4.0 (preview) | Previous versions: v3.1 (GA) v3.0 (GA) v2.1 (GA)
This content applies to: v3.1 (GA) | Latest version: v4.0 (preview) | Previous versions: v3.0 v2.1
This content applies to: v3.0 (GA) | Latest versions: v4.0 (preview) v3.1 | Previous version: v2.1
This content applies to: v2.1 | Latest version: v4.0 (preview)
The Document Intelligence receipt model combines powerful Optical Character Recognition (OCR) capabilities with deep learning models to analyze and extract key information from sales receipts. Receipts can be of various formats and quality including printed and handwritten receipts. The API extracts key information such as merchant name, merchant phone number, transaction date, tax, and transaction total and returns structured JSON data.
Supported receipt types:
- Thermal
- Credit Card
- Gas
- Parking
- Hotel
- Transportation
- Communication
- Entertainment
- Flight
- Training
- Pharmacy/Medical
Receipt data extraction
Receipt digitization encompasses the transformation of various types of receipts, including scanned, photographed, and printed copies, into a digital format for streamlined downstream processing. Examples include expense management, consumer behavior analysis, tax automation, etc. Using Document Intelligence with OCR (Optical Character Recognition) technology can extract and interpret data from these diverse receipt formats. Document Intelligence processing simplifies the conversion process but also significantly reduces the time and effort required, thus facilitating efficient data management, and retrieval.
Sample receipt processed with Document Intelligence Studio:
Sample receipt processed with Document Intelligence Sample Labeling tool:
Development options
Document Intelligence v4.0 (2024-07-31-preview) supports the following tools, applications, and libraries:
Feature | Resources | Model ID |
---|---|---|
Receipt model | • Document Intelligence Studio • REST API • C# SDK • Python SDK • Java SDK • JavaScript SDK |
prebuilt-receipt |
Document Intelligence v3.1 supports the following tools, applications, and libraries:
Feature | Resources | Model ID |
---|---|---|
Receipt model | • Document Intelligence Studio • REST API • C# SDK • Python SDK • Java SDK • JavaScript SDK |
prebuilt-receipt |
Document Intelligence v3.0 supports the following tools, applications, and libraries:
Feature | Resources | Model ID |
---|---|---|
Receipt model | • Document Intelligence Studio • REST API • C# SDK • Python SDK • Java SDK • JavaScript SDK |
prebuilt-receipt |
Document Intelligence v2.1 supports the following tools, applications, and libraries:
Feature | Resources |
---|---|
Receipt model | • Document Intelligence labeling tool • REST API • Client-library SDK • Document Intelligence Docker container |
Input requirements
Supported file formats:
Model PDF Image: JPEG/JPG
,PNG
,BMP
,TIFF
,HEIF
Microsoft Office:
Word (DOCX
), Excel (XLSX
), PowerPoint (PPTX
), HTMLRead ✔ ✔ ✔ Layout ✔ ✔ ✔ (2024-07-31-preview, 2024-02-29-preview, 2023-10-31-preview) General Document ✔ ✔ Prebuilt ✔ ✔ Custom extraction ✔ ✔ Custom classification ✔ ✔ ✔ (2024-07-31-preview, 2024-02-29-preview) For best results, provide one clear photo or high-quality scan per document.
For PDF and TIFF, up to 2,000 pages can be processed (with a free tier subscription, only the first two pages are processed).
The file size for analyzing documents is 500 MB for paid (S0) tier and
4
MB for free (F0) tier.Image dimensions must be between 50 pixels x 50 pixels and 10,000 pixels x 10,000 pixels.
If your PDFs are password-locked, you must remove the lock before submission.
The minimum height of the text to be extracted is 12 pixels for a 1024 x 768 pixel image. This dimension corresponds to about
8
point text at 150 dots per inch (DPI).For custom model training, the maximum number of pages for training data is 500 for the custom template model and 50,000 for the custom neural model.
For custom extraction model training, the total size of training data is 50 MB for template model and
1
GB for the neural model.For custom classification model training, the total size of training data is
1
GB with a maximum of 10,000 pages. For 2024-07-31-preview and later, the total size of training data is2
GB with a maximum of 10,000 pages.
- Supported file formats: JPEG, PNG, PDF, and TIFF.
- Supported page allowance for PDF and TIFF: Document Intelligence can process up to 2,000 pages for standard tier subscribers or only the first two pages for free-tier subscribers.
- Supported file size: less than 50 MB; minimum pixels 50 x 50 px; maximum pixels 10,000 x 10,000 px.
Receipt model data extraction
See how Document Intelligence extracts data, including time and date of transactions, merchant information, and amount totals from receipts. You need the following resources:
An Azure subscription—you can create one for free.
A Document Intelligence instance in the Azure portal. You can use the free pricing tier (
F0
) to try the service. After your resource deploys, select Go to resource to get your key and endpoint.
Note
Document Intelligence Studio is available with v3.1 and v3.0 APIs and later versions.
On the Document Intelligence Studio home page, select Receipts.
You can analyze the sample receipt or upload your own files.
Select the Run analysis button and, if necessary, configure the Analyze options:
Document Intelligence Sample Labeling tool
Navigate to the Document Intelligence Sample Tool.
On the sample tool home page, select the Use prebuilt model to get data tile.
Select the Form Type to analyze from the dropdown menu.
Choose a URL for the file you would like to analyze from the below options:
In the Source field, select URL from the dropdown menu, paste the selected URL, and select the Fetch button.
In the Document Intelligence service endpoint field, paste the endpoint that you obtained with your Document Intelligence subscription.
In the key field, paste the key you obtained from your Document Intelligence resource.
Select Run analysis. The Document Intelligence Sample Labeling tool calls the Analyze Prebuilt API and analyze the document.
View the results - see the key-value pairs extracted, line items, highlighted text extracted, and tables detected.
Note
The Sample Labeling tool does not support the BMP file format. This is a limitation of the tool not the Document Intelligence Service.
Supported languages and locales
For a complete list of supported languages, see our prebuilt models language support page.
Field extraction
Name | Type | Description | Standardized output |
---|---|---|---|
ReceiptType | String | Type of sales receipt | Itemized |
MerchantName | String | Name of the merchant issuing the receipt | |
MerchantPhoneNumber | phoneNumber | Listed phone number of merchant | +1 xxx xxx xxxx |
MerchantAddress | String | Listed address of merchant | |
TransactionDate | Date | Date the receipt was issued | yyyy-mm-dd |
TransactionTime | Time | Time the receipt was issued | hh-mm-ss (24-hour) |
Total | Number (USD) | Full transaction total of receipt | Two-decimal float |
Subtotal | Number (USD) | Subtotal of receipt, often before taxes are applied | Two-decimal float |
Tax | Number (USD) | Total tax on receipt (often sales tax, or equivalent). Renamed to "TotalTax" in 2022-06-30 version. | Two-decimal float |
Tip | Number (USD) | Tip included by buyer | Two-decimal float |
Items | Array of objects | Extracted line items, with name, quantity, unit price, and total price extracted | |
Name | String | Item description. Renamed to "Description" in 2022-06-30 version. | |
Quantity | Number | Quantity of each item | Two-decimal float |
Price | Number | Individual price of each item unit | Two-decimal float |
TotalPrice | Number | Total price of line item | Two-decimal float |
For supported document extraction fields, refer to the receipt model schema page in our GitHub sample repository.
Migration guide and REST API v3.1
- Follow our Document Intelligence v3.1 migration guide to learn how to use the v3.1 version in your applications and workflows.
Next steps
Try processing your own forms and documents with the Document Intelligence Studio.
Complete a Document Intelligence quickstart and get started creating a document processing app in the development language of your choice.
Try processing your own forms and documents with the Document Intelligence Sample Labeling tool.
Complete a Document Intelligence quickstart and get started creating a document processing app in the development language of your choice.