Key Value Extraction (Driver ID)

Key value extraction can be used to identify values for predefined keys in a US or UK driver's documentation. For example, if a Driver ID includes an issue date, region, and expiry date, Document Understanding can identify these values and return them as a key value pair.

The supported features are:

  • Extract values for predefined key value pairs
  • Bounding polygons
  • Confidence score
The supported fields are:
Supported Fields
Field Description API Response Value
FirstName First name (given name) listed on the document. Extracted Text
MiddleName Middle name listed on the document (if applicable). Extracted Text
LastName Last name (family name) listed on the document. Extracted Text
Country Country listed on the document. Extracted ISO 3166-1 country code
DateofBirth Date of birth. Date in YYYY/MM/DD format
ExpiryDate Date of expiration listed on the document. Date in YYYY/MM/DD format
IssueDate Date of issue listed on the document. Date in YYYY/MM/DD format
Gender Gender listed on the document. Extracted Text
DocumentNumber Document identification number. Extracted Text
Address Address listed on the document. Extracted Text
Region Region listed on the document. For example, state or territory. Extracted Text

Key Value Extraction (Driver ID) Example

An example of the use of key value extraction from driving documentation in Document Understanding.

Input document
Figure 1. Key Value Extraction (Driver ID) Input
Fictitious Minnesotan driver's license.
API Request:
{ 
       "processorConfig": {  
       "processorType": "GENERAL", 
       "features": [   
       {    
       "featureType": "KEY_VALUE_EXTRACTION"  
       }, 
       "documentType": "DRIVER_LICENSE" 
       }, 
       "inputLocation": {  
       "sourceType": "OBJECT_STORAGE_LOCATIONS",  
       "objectLocations": [   
       {    
       "source": "OBJECT_STORAGE",   
       "namespaceName": "",    
       "bucketName": "",    
       "objectName": ""   
       }  
       ] 
       }, 
       "compartmentId": "", 
       "outputLocation": {  
       "namespaceName": "",  
       "bucketName": "",  
       "prefix": "" 
       }
       }
Output:
API Response:
{
  "documentMetadata": {
    "pageCount": 1,
    "mimeType": "image/jpeg"
  },
  "pages": [
    {
      "pageNumber": 1,
      "detectedDocumentTypes": [
        {
          "documentType": "DRIVER_LICENSE",
          "confidence": 0.9585071
        },
        {
          "documentType": "BANK_STATEMENT",
          "confidence": 0.010580908
        },
        {
          "documentType": "INVOICE",
          "confidence": 0.006787545
        },
        {
          "documentType": "TAX_FORM",
          "confidence": 0.005904464
        },
        {
          "documentType": "CHECK",
          "confidence": 0.0050073466
        }
      ],
      "documentFields": [
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "Region",
            "confidence": 0.89
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.024051961713598392,
                  "y": 0.07871827327285588
                },
                {
                  "x": 0.5100519525133396,
                  "y": 0.07886743036052006
                },
                {
                  "x": 0.5100430018604494,
                  "y": 0.15142263403432707
                },
                {
                  "x": 0.024043011060708188,
                  "y": 0.15127347694666288
                }
              ]
            },
            "value": "SOUTH CAROLINA"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "DateOfBirth",
            "confidence": 0.9
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.4519959147410437,
                  "y": 0.5331082961999155
                },
                {
                  "x": 0.6059959118257354,
                  "y": 0.5331555599684346
                },
                {
                  "x": 0.605990463602237,
                  "y": 0.5773195969872736
                },
                {
                  "x": 0.4519904665175453,
                  "y": 0.5772723332187545
                }
              ]
            },
            "value": "07/04/1970"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "IssueDate",
            "confidence": 0.89
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.4739889094657875,
                  "y": 0.5898973814767827
                },
                {
                  "x": 0.6259889065883404,
                  "y": 0.5899440314301262
                },
                {
                  "x": 0.6259834583648419,
                  "y": 0.6341080684489652
                },
                {
                  "x": 0.4739834612422891,
                  "y": 0.6340614184956217
                }
              ]
            },
            "value": "10/01/2017"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "ExpiryDate",
            "confidence": 0.91
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.4979834607879553,
                  "y": 0.6340687842777286
                },
                {
                  "x": 0.6539834578347857,
                  "y": 0.6341166618614232
                },
                {
                  "x": 0.6539772312936447,
                  "y": 0.6845898470258107
                },
                {
                  "x": 0.4979772342468143,
                  "y": 0.6845419694421161
                }
              ]
            },
            "value": "07/04/2025"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "Sex",
            "confidence": 0.88
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.4299752897399868,
                  "y": 0.7002939700900176
                },
                {
                  "x": 0.4519752893235141,
                  "y": 0.7003007220569489
                },
                {
                  "x": 0.45197023025883704,
                  "y": 0.7413101850030137
                },
                {
                  "x": 0.42997023067530965,
                  "y": 0.7413034330360825
                }
              ]
            },
            "value": "F"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "DocumentId",
            "confidence": 0.92
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.4440297717099426,
                  "y": 0.2586578966078565
                },
                {
                  "x": 0.6340297681131335,
                  "y": 0.2587162090495359
                },
                {
                  "x": 0.6340227632543499,
                  "y": 0.3154985423594718
                },
                {
                  "x": 0.444022766851159,
                  "y": 0.31544022991779236
                }
              ]
            },
            "value": "123456789"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "LastName",
            "confidence": 0.92
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.35402160107844666,
                  "y": 0.3248763304532142
                },
                {
                  "x": 0.4800215986931944,
                  "y": 0.32491500080927527
                },
                {
                  "x": 0.48001576131087464,
                  "y": 0.3722336119008885
                },
                {
                  "x": 0.354015763696127,
                  "y": 0.3721949415448274
                }
              ]
            },
            "value": "SAMPLE"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "FirstName",
            "confidence": 0.89
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.35001576377184923,
                  "y": 0.37219371391447625
                },
                {
                  "x": 0.5340157602886237,
                  "y": 0.372250184910629
                },
                {
                  "x": 0.5340091445886613,
                  "y": 0.4258779441477906
                },
                {
                  "x": 0.3500091480718869,
                  "y": 0.42582147315163793
                }
              ]
            },
            "value": "JANE MARIA"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "Address",
            "confidence": 0.9066667
          },
          "fieldValue": {
            "valueType": "STRING",
            "boundingPolygon": {
              "normalizedVertices": [
                {
                  "x": 0.3540099263138073,
                  "y": 0.4195135526364407
                },
                {
                  "x": 0.7260099192716337,
                  "y": 0.4196277222590973
                },
                {
                  "x": 0.7259978553481731,
                  "y": 0.5174195185150979
                },
                {
                  "x": 0.35399786239034653,
                  "y": 0.5173053488924414
                }
              ]
            },
            "value": "123 MAIN STREET ANYTOWN, SC 123451111"
          }
        },
        {
          "fieldType": "KEY_VALUE",
          "fieldLabel": {
            "name": "MiddleName",
            "confidence": 0
          },
          "fieldValue": {
            "valueType": "STRING"
          }
        }
      ]
    }
  ],
  "detectedDocumentTypes": [
    {
      "documentType": "DRIVER_LICENSE",
      "confidence": 0.9585071
    }
  ],
  "documentClassificationModelVersion": "*.*.*",
  "keyValueExtractionModelVersion": "*.*.*"
}