AI Models¶
This SDK makes extensive use of AI models, particularly for detection, analysis and facial recognition tasks.
AI models are files with a .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.
Important
Warning
AI model files MUST NOT be renamed.
Face detection models¶
Name |
Size |
Description |
|---|---|---|
FaceDetector4A |
8.29 MB |
Best model to detect very small faces. Use to detect all faces in a wild environment, without need for recognition. |
FaceDetector4B |
1.25 MB |
Fast face detection model, suitable for all face recognition scenarios. |
FaceDetector3A |
57.66 MB |
Obsolete. Provided for backward compatibility. Use model 4A whenever possible. |
FaceDetector3B |
0.98 MB |
Obsolete. Provided for backward compatibility. Use model 4B whenever possible. |
FaceDetector3C |
0.22 MB |
Ultra-light detector, dedicated to short-range real-time detection/tracking applications only. |
Face analysis models¶
Name |
Description |
|---|---|
CompressionArtifactsRemover1A |
Removes image compression artifacts. |
EyeGazeEstimator2A |
Estimates the direction of gaze. |
EyeOpennessDetector1A |
Detects the degree of eye opening. |
EyeRednessDetector1A |
Detects red-eye. |
FaceAgeEstimator1A |
Estimates the subject’s age. |
FaceAttributesClassifier2A |
Detects facial attributes such as glasses, hat, make-up, mouth opening, smile and gender of the subject. |
FaceBackgroundSegmenter1A |
Removes the background. |
FaceBackgroundUniformityEstimator1A |
Estimates color and structure uniformity of the background. |
FaceEncodingQualityEstimator3A |
Estimates the quality of the encoded template. |
FaceExpressionClassifier1A |
Face expression classifier. |
FaceLandmarksEstimator2A |
Extracts 68 landmark features. |
FaceMaskClassifier2A |
Detects the presence of a protective mask on a subject’s face. |
FaceOcclusionDetector2A |
Detects occlusions on the subject’s face (eyes, nose, mouth) |
FacePoseEstimator1A |
Estimates the pose of the face (yaw pitch, roll). |
FaceSegmenter2A |
Divides the input face image into distincts facial regions (e.g., eyes, nose, mouth, and other key landmarks). |
Face encoding models¶
Name |
Size |
Template Size |
Description |
|---|---|---|---|
FaceEncoder10A |
128 MB |
264 bytes |
This model provides the best accuracy. Recommended for all desktop use, and particularly for 1-to-N identification. |
FaceEncoder10B |
20.9 MB |
140 bytes |
This model provides a good balance of accuracy, speed, and size. Recommended for mobile/embedded devices with 1-to-1 verification use-cases. |
FaceEncoder10C |
1.95 MB |
140 bytes |
Ultra-light model, recommended for real-time tracking of users. Not suitable for critical security use-cases. |
FaceEncoder9A |
127.36 MB |
264 bytes |
Obsolete. Provided for backward compatibility. Use model 10A whenever possible. |
FaceEncoder9B |
1.99 MB |
140 bytes |
Obsolete. Provided for backward compatibility. Use model 10B whenever possible. |
FaceEncoder9C |
0.64 MB |
140 bytes |
Obsolete. Provided for backward compatibility. Use model 10C whenever possible. |
Face liveness models¶
Name |
Size |
Description |
|---|---|---|
FaceColorBasedPad4A |
6.72 MB |
Detects presentation attacks in static RGB frames using a color-based method. |
FaceColorBasedPad3A |
6.72 MB |
Obsolete. |
Loading AI models¶
It is recommended to load the AI models on application startup. The FaceLibrary Class provides methods for loading and unloading AI model file in memory.
An example is given below:
id3.FaceLibrary.load_model(ai_models_folder, id3.FaceModel.FACE_DETECTOR_4B, id3.ProcessingUnit.CPU)
id3.FaceLibrary.load_model(ai_models_folder, id3.FaceModel.FACE_ENCODER_9B, id3.ProcessingUnit.CPU)
Hint
The first execution of a model takes generally more time due to memory allocation. To mitigate this problem, an optional warm-up method can be called on application startup to prepare the inference of model. However, warm-up will have no effect if you change the input size between successive calls !
For example, you can prepare the face detection model by calling the FaceDetector.warmUp Method.
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.