AI Models¶
This SDK makes extensive use of AI models, particularly for minutiae detection and encoding tasks.
The following models are available:
Name |
Description |
---|---|
|
Detects documents. Best balance between accuracy and speed for mobile apps. |
|
Detects documents. Fast detector for low-end mobiles. |
|
Detects and reads machine-readable zones (MRZ). Stand-alone reader. |
|
Recognizes digits and characters (OCR) in latin alphabet. |
Important
AI model files¶
AI model files have the .id3nn
extension. You must copy the necessary data files into your application package. If you wish to reduce the size of your application, we recommend copying only the files required by the biometric algorithm.
In your application’s source code you should specify location of these files.
Warning
AI model files MUST NOT be renamed.
Loading AI models¶
It is recommended to load the AI models on application startup. The DocumentLibrary Class provides methods for loading and unloading AI model file in memory.
An example is given below:
id3document.DocumentLibrary.load_model(ai_models_path, id3document.DocumentModel.DOCUMENT_DETECTOR_2A, id3document.ProcessingUnit.CPU)
id3document.DocumentLibrary.load_model(ai_models_path, id3document.DocumentModel.OCR_LATIN_2A, id3document.ProcessingUnit.CPU)
Processing units¶
The inference of the AI models can be executed on either the CPU or the GPU if available, by specifying a ProcessingUnit Enumeration. The GPU options selects a default backend depending on your platform. Detailed backend options are available to ensure a specific backend.
Warning
Inference on GPU is an experimental feature. Some models might be unstable on some backend or provide nonsense result. We strongly encourage you to verify the results on those backends, and contact our support in case of inadequate behaviour.