Skip to content

Validation

Before the IDLive Face Server processes the image, it validates if the image satisfies the necessary requirements. Some of these validations can be disabled, and others can be adjusted.

Here are all validation that are being checked:

  • FACE_NOT_FOUND – No faces are found on the image.

  • TOO_MANY_FACES – There is more than one face on the image.

  • SMALL_FACE_SIZE – The face box is too small.

  • SMALL_RELATIVE_FACE_SIZE – The face relative size is too small.

  • SMALL_PUPILLARY_DISTANCE – The distance between pupils on the face is too small.

  • LARGE_FACE_ROTATION_ANGLE – The rotation angle of the head is too big.

  • FACE_TOO_CLOSE – The face is too close to the camera.

  • FACE_CLOSE_TO_BORDER – The face is too close to one or more image borders.

  • FACE_CROPPED – The face is cropped.

  • FACE_OCCLUDED – The face is occluded, for example with a medical mask.

  • EYES_CLOSED – The eyes are closed.

  • DARK_IMAGE – The image is too dark.

Suppress validations

Several validations can be suppressed:

idliveface::Blueprint blueprint(...);

blueprint.SuppressValidation(idliveface::Validation::kFaceOccluded);

idliveface::FaceAnalyzer analyzer = blueprint.CreateFaceAnalyzer();
blueprint = idliveface.Blueprint(...)

blueprint.suppress_validation(idliveface.Validation.FACE_OCCLUDED)

analyzer = blueprint.create_face_analyzer()
Blueprint blueprint = new Blueprint(...);

blueprint.suppressValidation(Validation.FACE_OCCLUDED);

FaceAnalyzer analyzer = blueprint.createFaceAnalyzer();

Such validations will be completelly ignored. Currently you can suppress these validations:

  • FACE_OCCLUDED
  • EYES_CLOSED
  • DARK_IMAGE

Configure validations

Some validations can be configured:

idliveface::Blueprint blueprint(...);

idliveface::CustomValidationParameters validation_parameters;
validation_parameters.min_face_size = 1000;
blueprint.OverrideValidationParameters(validation_parameters);

idliveface::FaceAnalyzer analyzer = blueprint.CreateFaceAnalyzer();
blueprint = idliveface.Blueprint(...)

blueprint.override_validation_parameters({"min_face_size": 1000})

analyzer = blueprint.create_face_analyzer()
Blueprint blueprint = new Blueprint(...);

blueprint.overrideValidationParameters(
        new CustomValidationParameters().setMinFaceSize(1000));

FaceAnalyzer analyzer = blueprint.createFaceAnalyzer();

Available validation 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.

By default the validation parameters are set to these 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