Configuration¶
IDLive Face parameters can be edited via the API by calling the static methods of the FaceSDK
/Settings
class before creating the pipeline:
facesdk::FaceSDK::setEnableFaceOcclusionDetection(false);
FaceSDK.setEnableFaceOcclusionDetection(False)
Settings.setEnableFaceOcclusionDetection(false);
Settings.SetEnableFaceOcclusionDetection(false);
These parameters can also be set via the environment variables:
FACESDK_ENABLE_FACE_OCCLUSION_DETECTION=0 ./application
Some additional IDLive Face parameters can be adjusted by editing configuration files.
API parameters¶
Face occlusion detection ¶
setEnableFaceOcclusionDetection()
/ FACESDK_ENABLE_FACE_OCCLUSION_DETECTION
Controls whether to validate if a face is not occluded. If it is occluded the FACE_IS_OCCLUDED
error will be thrown. Allowed values are 0 (disabled) and 1 (enabled). Enabled by default.
Closed eyes detection ¶
setEnableClosedEyesDetection()
/ FACESDK_ENABLE_CLOSED_EYES_DETECTION
Controls whether to validate if eyes on a face were not closed. If they were closed the EYES_CLOSED
error will be thrown. Allowed values are 0 (disabled) and 1 (enabled). Disabled by default.
Note
Only pipelines added in version 1.31 and later support closed eyes detection.
Configuration files¶
It is possible to change internal parameters used to validate the image. Lower values will lead to less images being rejected, but the accuracy might degrade for such images.
The parameters are defined in data/preprocessing/face_params.conf
file.
Legacy pipelines
Older pipelines used different configuration files:
data/preprocessing/b0.conf
for Heron and Demetra pipelines.data/preprocessing/jupiter_preprocessing.conf
for Theia, Dionysus and Hephaestus pipelines.
Available parameters:
-
min_face_size
– Minimal width and height of the face box, in pixels. -
min_face_size_relative
– Minimal relative width and height of the face box, as a ratio of the face's width and height to the image's width and height. Defined as a value between 0 and 1. For example, if the value is 0.25, one side of the face box should be at least a quarter of the image's corresponding side. -
detectable_face_size_relative
– Similar to the parameter above, but if the size of the face box is smaller than the value, the face is just being skipped. It is used as a filter for small faces in the background. -
min_pupillary_distance
– Minimal distance between the pupils on the face, in pixels. -
min_face_padding
– Minimal distance from the image's border to the face box, in pixels. -
max_roll
– Max roll angle of the head, in degrees. -
max_yaw
– Max yaw angle of the head, in degrees. -
max_pitch
– Max pitch angle of the head, in degrees.
Parameter names before 1.41
Before version 1.41 some parameters had different names:
New name | Old name |
---|---|
detectable_face_size_relative | detectable_face_size_threshold |
min_pupillary_distance | min_intpup_dist |
min_face_padding | face_padding |
You can still use the old names if necessary.
Default values¶
Parameter | Value | Value (DESKTOP) |
---|---|---|
min_pupillary_distance | 50 | 50 |
min_face_size | 150 | 150 |
min_face_size_relative | 0.15 | 0.15 |
detectable_face_size_relative | 0.075 | 0.075 |
min_face_padding | 15 | 15 |
max_roll | 45 | 45 |
max_yaw | 30 | 30 |
max_pitch | 30 | 30 |