Azure Form Recognizer identity document model

This article applies to: Form Recognizer v3.0 checkmark Form Recognizer v3.0. Earlier version: Form Recognizer v2.1

This article applies to: Form Recognizer v2.1 checkmark Form Recognizer v2.1. Later version: Form Recognizer v3.0

Form Recognizer Identity document (ID) model combines Optical Character Recognition (OCR) with deep learning models to analyze and extract key information from identity documents such as US Drivers Licenses (all 50 states and District of Columbia), international passport biographical pages, US state IDs, social security cards, and permanent resident cards and more. The API analyzes identity documents, extracts key information, and returns a structured JSON data representation.

Azure Form Recognizer can analyze and extract information from government-issued identification documents (IDs) using its prebuilt IDs model. It combines our powerful Optical Character Recognition (OCR) capabilities with ID recognition capabilities to extract key information from Worldwide Passports and U.S. Driver's Licenses (all 50 states and D.C.). The IDs API extracts key information from these identity documents, such as first name, last name, date of birth, document number, and more. This API is available in the Form Recognizer v2.1 as a cloud service.

Identity document processing

Identity document processing involves extracting data from identity documents either manually or by using OCR-based technology. ID document is processing an important step in any business process that requires some proof of identity. Examples include customer verification in banks and other financial institutions, mortgage applications, medical visits, claim processing, hospitality industry, and more. Individuals provide some proof of their identity via driver licenses, passports, and other similar documents so that the business can efficiently verify them before providing services and benefits.

Sample U.S. Driver's License processed with Form Recognizer Studio

Image of a sample driver's license.

Data extraction

The prebuilt IDs service extracts the key values from worldwide passports and U.S. Driver's Licenses and returns them in an organized structured JSON response.

Driver's license example

Sample Driver's License

Passport example

Sample Passport

Development options

The following tools are supported by Form Recognizer v3.0:

Feature Resources Model ID
ID document model prebuilt-idDocument

The following tools are supported by Form Recognizer v2.1:

Feature Resources
ID document model

Input requirements

  • For best results, provide one clear photo or high-quality scan per document.

  • Supported file formats:

    Model PDF Image:
    JPEG/JPG, PNG, BMP, and TIFF
    Microsoft Office:
    Word (DOCX), Excel (XLS), PowerPoint (PPT), and HTML
    Read REST API version
    2022/06/30-preview
    Layout
    General Document
    Prebuilt
    Custom

    ✱ Microsoft Office files are currently not supported for other models or versions.

  • For PDF and TIFF, up to 2000 pages can be processed (with a free tier subscription, only the first two pages are processed).

  • The file size for analyzing documents must be less than 500 MB for paid (S0) tier and 4 MB for free (F0) tier.

  • Image dimensions must be between 50 x 50 pixels and 10,000 px x 10,000 pixels.

  • PDF dimensions are up to 17 x 17 inches, corresponding to Legal or A3 paper size, or smaller.

  • 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 model training, the total size of training data is 50 MB for template model and 1G-MB for the neural model.

  • Supported file formats: JPEG, PNG, PDF, and TIFF
  • For PDF and TIFF, up to 2000 pages are processed. For free tier subscribers, only the first two pages are processed.
  • The file size must be less than 50 MB and dimensions at least 50 x 50 pixels and at most 10,000 x 10,000 pixels.

Try Form Recognizer

Extract data, including name, birth date, and expiration date, from ID documents. You'll need the following resources:

  • An Azure subscription—you can create one for free

  • A Form Recognizer 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.

Screenshot: keys and endpoint location in the Azure portal.

Form Recognizer Studio

Note

Form Recognizer studio is available with the v3.0 API (API version 2022-08-31 generally available (GA) release)

  1. On the Form Recognizer Studio home page, select Identity documents

  2. You can analyze the sample invoice or select the + Add button to upload your own sample.

  3. Select the Analyze button:

    Screenshot: analyze ID document menu.

Form Recognizer Sample Labeling tool

  1. Navigate to the Form Recognizer Sample Tool.

  2. On the sample tool home page, select the Use prebuilt model to get data tile.

    Screenshot of the layout model analyze results operation.

  3. Select the Form Type to analyze from the dropdown menu.

  4. Choose a URL for the file you would like to analyze from the below options:

  5. In the Source field, select URL from the dropdown menu, paste the selected URL, and select the Fetch button.

    Screenshot of source location dropdown menu.

  6. In the Form recognizer service endpoint field, paste the endpoint that you obtained with your Form Recognizer subscription.

  7. In the key field, paste the key you obtained from your Form Recognizer resource.

    Screenshot: select form type dropdown menu.

  8. Select Run analysis. The Form Recognizer Sample Labeling tool will call the Analyze Prebuilt API and analyze the document.

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

    Screenshot of the identity model analyze results operation.

  10. Download the JSON output file to view the detailed results.

    • The "readResults" node contains every line of text with its respective bounding box placement on the page.
    • The "selectionMarks" node shows every selection mark (checkbox, radio mark) and whether its status is "selected" or "unselected".
    • The "pageResults" section includes the tables extracted. For each table, the text, row, and column index, row and column spanning, bounding box, and more are extracted.
    • The "documentResults" field contains key/value pairs information and line items information for the most relevant parts of the document.

Note

The Sample Labeling tool does not support the BMP file format. This is a limitation of the tool not the Form Recognizer Service.

Supported languages and locales

Note

It's not necessary to specify a locale. This is an optional parameter. The Form Recognizer deep-learning technology will auto-detect the language of the text in your image.

Model Language—Locale code Default
ID document
  • English (United States)—en-US (driver's license)
  • Biographical pages from international passports
    (excluding visa and other travel documents)
  • English (United States)—en-US (state ID)
  • English (United States)—en-US (social security card)
  • English (United States)—en-US (permanent resident card)

English (United States)—en-US

Field extractions

Below are the fields extracted per document type. The Azure Form Recognizer ID model prebuilt-idDocument extracts the below fields in the documents.*.fields. It also extracts all the text in the documents, words, lines, and styles that are included in the JSON output in the different sections.

Note

In addition to specifying the IdDocument model, you can designate the ID type for (driver license, passport, national identity card, residence permit, or US social security card ).

Data extraction (all types)

Model ID Text extraction Language detection Selection Marks Tables Paragraphs Structure Key-Value pairs Fields
prebuilt-idDocument

Document types

idDocument.driverLicense fields extracted

Field Type Description Example
CountryRegion countryRegion Country or region code USA
Region string State or province Washington
DocumentNumber string Driver license number WDLABCD456DG
DocumentDiscriminator string Driver license document discriminator 12645646464554646456464544
FirstName string Given name and middle initial if applicable LIAM R.
LastName string Surname TALBOT
Address address Address 123 STREET ADDRESS YOUR CITY WA 99999-1234
DateOfBirth date Date of birth 01/06/1958
DateOfExpiration date Date of expiration 08/12/2020
DateOfIssue date Date of issue 08/12/2012
EyeColor string Eye color BLU
HairColor string Hair color BRO
Height string Height 5'11"
Weight string Weight 185LB
Sex string Sex M
Endorsements string Endorsements L
Restrictions string Restrictions B
VehicleClassifications string Vehicle classification D

idDocument.passport fields extracted

Field Type Description Example
DocumentNumber string Passport number 340020013
FirstName string Given name and middle initial if applicable JENNIFER
MiddleName string Name between given name and surname REYES
LastName string Surname BROOKS
Aliases array
Aliases.* string Also known as MAY LIN
DateOfBirth date Date of birth 1980-01-01
DateOfExpiration date Date of expiration 2019-05-05
DateOfIssue date Date of issue 2014-05-06
Sex string Sex F
CountryRegion countryRegion Issuing country or organization USA
DocumentType string Document type P
Nationality countryRegion Nationality USA
PlaceOfBirth string Place of birth MASSACHUSETTS, U.S.A.
PlaceOfIssue string Place of issue LA PAZ
IssuingAuthority string Issuing authority United States Department of State
PersonalNumber string Personal Id. No. A234567893
MachineReadableZone object Machine readable zone (MRZ) P<USABROOKS<<JENNIFER<<<<<<<<<<<<<<<<<<<<<<< 3400200135USA8001014F1905054710000307<715816
MachineReadableZone.FirstName string Given name and middle initial if applicable JENNIFER
MachineReadableZone.LastName string Surname BROOKS
MachineReadableZone.DocumentNumber string Passport number 340020013
MachineReadableZone.CountryRegion countryRegion Issuing country or organization USA
MachineReadableZone.Nationality countryRegion Nationality USA
MachineReadableZone.DateOfBirth date Date of birth 1980-01-01
MachineReadableZone.DateOfExpiration date Date of expiration 2019-05-05
MachineReadableZone.Sex string Sex F

idDocument.nationalIdentityCard fields extracted

Field Type Description Example
CountryRegion countryRegion Country or region code USA
Region string State or province Washington
DocumentNumber string National identity card number WDLABCD456DG
DocumentDiscriminator string National identity card document discriminator 12645646464554646456464544
FirstName string Given name and middle initial if applicable LIAM R.
LastName string Surname TALBOT
Address address Address 123 STREET ADDRESS YOUR CITY WA 99999-1234
DateOfBirth date Date of birth 01/06/1958
DateOfExpiration date Date of expiration 08/12/2020
DateOfIssue date Date of issue 08/12/2012
EyeColor string Eye color BLU
HairColor string Hair color BRO
Height string Height 5'11"
Weight string Weight 185LB
Sex string Sex M

idDocument.residencePermit fields extracted

Field Type Description Example
CountryRegion countryRegion Country or region code USA
DocumentNumber string Residence permit number WDLABCD456DG
FirstName string Given name and middle initial if applicable LIAM R.
LastName string Surname TALBOT
DateOfBirth date Date of birth 01/06/1958
DateOfExpiration date Date of expiration 08/12/2020
DateOfIssue date Date of issue 08/12/2012
Sex string Sex M
PlaceOfBirth string Place of birth Germany
Category string Permit category DV2

idDocument.usSocialSecurityCard fields extracted

Field Type Description Example
DocumentNumber string Social security card number WDLABCD456DG
FirstName string Given name and middle initial if applicable LIAM R.
LastName string Surname TALBOT
DateOfIssue date Date of issue 08/12/2012

idDocument field extracted

Name Type Description Standardized output
DateOfIssue Date Issue date yyyy-mm-dd
Height String Height of the holder.
Weight String Weight of the holder.
EyeColor String Eye color of the holder.
HairColor String Hair color of the holder.
DocumentDiscriminator String Document discriminator is a security code that identifies where and when the license was issued.
Endorsements String More driving privileges granted to a driver such as Motorcycle or School bus.
Restrictions String Restricted driving privileges applicable to suspended or revoked licenses.
VehicleClassification String Types of vehicles that can be driven by a driver.
CountryRegion countryRegion Country or region code compliant with ISO 3166 standard
DateOfBirth Date DOB yyyy-mm-dd
DateOfExpiration Date Expiration date DOB yyyy-mm-dd
DocumentNumber String Relevant passport number, driver's license number, etc.
FirstName String Extracted given name and middle initial if applicable
LastName String Extracted surname
Nationality countryRegion Country or region code compliant with ISO 3166 standard (Passport only)
Sex String Possible extracted values include "M", "F" and "X"
MachineReadableZone Object Extracted Passport MRZ including two lines of 44 characters each "P<USABROOKS<<JENNIFER<<<<<<<<<<<<<<<<<<<<<<< 3400200135USA8001014F1905054710000307<715816"
DocumentType String Document type, for example, Passport, Driver's License, Social security card and more "passport"
Address String Extracted address, address is also parsed to its components - address, city, state, country, zip code
Region String Extracted region, state, province, etc. (Driver's License only)

Supported document types and locales

Prebuilt ID v2.1 extracts key values from worldwide passports, and U.S. Driver's Licenses in the en-us locale.

Fields extracted

Name Type Description Value
Country country Country code compliant with ISO 3166 standard "USA"
DateOfBirth date DOB in YYYY-MM-DD format "1980-01-01"
DateOfExpiration date Expiration date in YYYY-MM-DD format "2019-05-05"
DocumentNumber string Relevant passport number, driver's license number, etc. "340020013"
FirstName string Extracted given name and middle initial if applicable "JENNIFER"
LastName string Extracted surname "BROOKS"
Nationality country Country code compliant with ISO 3166 standard "USA"
Sex gender Possible extracted values include "M", "F" and "X" "F"
MachineReadableZone object Extracted Passport MRZ including two lines of 44 characters each "P<USABROOKS<<JENNIFER<<<<<<<<<<<<<<<<<<<<<<< 3400200135USA8001014F1905054710000307<715816"
DocumentType string Document type, for example, Passport, Driver's License "passport"
Address string Extracted address (Driver's License only) "123 STREET ADDRESS YOUR CITY WA 99999-1234"
Region string Extracted region, state, province, etc. (Driver's License only) "Washington"

Migration guide

Next steps