Face Image Quality
- SDK.estimate_face_template_quality(self: tfsdk.SDK, aligned_face_image: tfsdk.TFFacechip) Tuple[tfsdk.ERRORCODE, bool, float]
Template quality score is a metric defined to measure the biometric utility or effectiveness of a face sample for the purpose of face recognition. It does not measure the visual quality of the sample. Biometric utility is specifically about the sample’s effectiveness in a biometric system, which may not always align with human perception of image quality. For instance, a visually clear image might have low biometric utility if the facial features are not captured in a way conducive to accurate matching.
- Parameters:
aligned_face_image - The input
tfsdk.TFFacechip
.- Returns:
tfsdk.ERRORCODE
- The error code.bool - Indicates if the face chip is suitable for face recognition.
float - Quality score to be used for custom thresholding (default > 1.f is good quality).
- SDK.estimate_face_template_qualities(self: tfsdk.SDK, aligned_face_images: List[tfsdk.TFFacechip]) Tuple[tfsdk.ERRORCODE, List[bool], List[float]]
Template quality score is a metric defined to measure the biometric utility or effectiveness of a face sample for the purpose of face recognition. It does not measure the visual quality of the sample. Biometric utility is specifically about the sample’s effectiveness in a biometric system, which may not always align with human perception of image quality. For instance, a visually clear image might have low biometric utility if the facial features are not captured in a way conducive to accurate matching. This batch processing method increases throughput when using GPU inference.
- Parameters:
aligned_face_images - A list of input
tfsdk.TFFacechip
.- Returns:
tfsdk.ERRORCODE
- The error code.List[bool] - Indicates if the face chips are suitable for face recognition
List[float] - Quality scores to be used for custom thresholding (default > 1.f is good 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 bytfsdk.SDK.extract_aligned_face()
.- Returns:
tfsdk.ERRORCODE
- The error code.float - The quality score. 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:
tfsdk.ERRORCODE
- The error code.tfsdk.FACEIMAGEQUALITY
- Indicates if the face is over or under exposed.float - The percentage of pixels in the image which are above the brightness threshold.
float - The percentage of pixels in the image which are below the darkness threshold.
float - 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 bytfsdk.SDK.extract_aligned_face()
.- Returns:
tfsdk.ERRORCODE
- The error code.tfsdk.FACEIMAGEQUALITY
- Indicates if the image is blurry.float - The probability of the image being blurry.
- SDK.detect_face_image_blurs(self: tfsdk.SDK, tf_facechips: List[tfsdk.TFFacechip]) Tuple[tfsdk.ERRORCODE, List[tfsdk.FACEIMAGEQUALITY], List[float]]
Determine if the provided face images are blurry or are of good quality for face recognition. This batch processing method increases throughput when using GPU inference. Refer to our FAQ page to understand the impact of face blur on similarity score.
- Parameters:
tf_facechips - List of
tfsdk.TFFacechip
.- Returns:
tfsdk.ERRORCODE
- The error code.List[
tfsdk.FACEIMAGEQUALITY
] - List indicating if the images are blurry.List[float] - List of probabilities of the images 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.