ID Document Data Extraction - OCR
Optical Character Recognition (OCR) functionality of DOT Digital Identity Service processes the image of identity documents of customer whose identity is verified, and extracts text and image data from those images.
The recognized text data is returned as a class that describes the customer that owns the document. The data are split between those relevant to the “customer” him/herself and those relevant to the “document” of that customer. The data structure is described in the response of the GET customers API call.
Each text field is assigned to a category that is universal across all documents, such as “surname”. It is possible to also retrieve the label - name of that text field as stated on the document using the GET metadata API call.
Some text fields, such as dates or gender, are normalized to standard format, so that it is possible to operate with documents of multiple countries using the same logic.
If there is an MRZ field, it is parsed and its information are returned as an alternative value of the text fields. The MRZ field is also used for cross-checking the data from the Visual Inspection Zone (VIZ).
The Document Server also returns image fields, such as primary face photo, images of signature or fingerprints.
API to request OCR
To perform document OCR, at first the customer and customer’s document entities needs to be created. This is done with the POST customers API call and PUT document API call.
After that, the photos of the ID document pages have to be uploaded - front and back side for ID cards, or just a single page for passport, using the PUT document/pages API call.
The recognized data are retrieved with the GET customers API call.
Supported Identity Document types
DOT Document Server can support identity documents of the following types:
- Identity cards
- Driving licenses
- Foreigner permanent residence cards
- and other cards of similar format containing a photo of the holder
The support for document recognition may be in two levels:
- Level 1 means extraction of the data found in the MRZ zone.
- Level 2 means extraction of all the data in both visual inspection zone (VIZ) and MRZ zone (if present).
For Level 2 support, the DOT Document Server needs to be trained to support each individual document type and its edition. Please check the availability of the required document in the list of supported documents for both levels. In the case an ID document type required for your project is not mentioned in the list, a future version of the Document Server can be trained to support it. Please contact Innovatrics to request it.
Documents not containing a MRZ field and not supported by Level 2 are classified as unknown documents, and get only the face photo returned.
DOT Digital Identity Service returns an OCR confidence score for text fields with lower confidence. Based on this, the digital onboarding solution can decide whether to trust a field or to ask the user to review it. The score can be in the range 0 to 1, and text fields with value higher than 0.9 should not need review, so this value is not returned in this case.
The DOT Document server provides a standardized set of text fields, so that documents of different types can be evaluated with the same logic. Text fields such as dates are normalized to ISO format.
To find out which text fields are returned for a specific document type, use the GET metadata API call.
DOT provides technology to check the authenticity of an identity document, more about it is in the Document Authenticity Evaluation.
The document page photo quality check is provided if the corresponding API call is used. It checks if the photo of the document has the correct brightness, sharpness, doesn’t contain hotspots, has enough background borders around the document in the image, and is the correct size.
The document page photo quality check result contains detection confidence and the coordinates of the document in the image.
Document image quality issues are displayed in documentation.
- The supported image formats are JPEG, PNG, BMP, WEBMP or GIF
- The document image must be large enough - document card width should be approximately 1000 pixels on the image
- The document card edges must be clearly visible and be placed at least 10 px inside the image area
- The image must be sharp enough for the human eye to recognize the text
- There should be no glare on the document card that obscures the text or photo
- The image should not contain objects or backgrounds with visible edges. This can confuse the detection process