Face Image Quality

SDK.estimate_face_image_quality(self: tfsdk.SDK, aligned_face_image: tfsdk.TFFacechip)Tuple[tfsdk.ERRORCODE, float]

Estimate the image quality for face recognition, with a score of 1 indicating perfect quality. This method currently calls tfsdk.SDK.detect_face_image_blur() behind the scene and converts the score to either 1 or 0. In the future, more metrics will be added internally in this function.

Parameters

tf_facechip - the tfsdk.TFFacechip returned by tfsdk.SDK.extract_aligned_face().

Returns

The ERRORCODE and face quality score, in that order. The quality score is between 0 and 1. We suggest using a threshold of 0.5 as a filter for enrollment images.

SDK.check_face_image_exposure(self: tfsdk.SDK, tf_image: tfsdk.TFImage, face_box_and_landmarks: tfsdk.FaceBoxAndLandmarks)Tuple[tfsdk.ERRORCODE, tfsdk.FACEIMAGEQUALITY, float, float, float]

Determine if the image is over or under exposed, indicating suboptimal lighting conditions for face recognition. Refer to our FAQ page to understand the impact of face exposure on similarity score.

Parameters
  • tf_image – the input image.

  • face_box_and_landmarks – the face to analyze.

Returns

The ERRORCODE, and the FACEIMAGEQUALITY indicating if the face is over or under exposed, a float indicating the percentage of pixels in the image which are above the brightness threshold,

a float indicating the percentage of pixels in the image which are below the darkness threshold, a float indicating the percentage of pixels in the face region which are above the brightness threshold..

SDK.detect_face_image_blur(self: tfsdk.SDK, tf_facechip: tfsdk.TFFacechip)Tuple[tfsdk.ERRORCODE, tfsdk.FACEIMAGEQUALITY, float]

Determine if the face image is blurry or is of good quality for face recognition. Refer to our FAQ page to understand the impact of face blur on similarity score.

Parameters

tf_facechip – the tfsdk.TFFacechip returned by tfsdk.SDK.extract_aligned_face().

Returns

The ERRORCODE, the FACEIMAGEQUALITY, and a float indicating the probability of the image being blurry.

class tfsdk.FACEIMAGEQUALITY

Describes the quality of a face image to be used for face recognition.

Members:

GOOD : The quality of the image is good for face recognition.

UNDER_EXPOSED : The image is under exposed.

OVER_EXPOSED : The image is over exposed.

BLURRY : The image is blurry.