FacePad.computeDepthBasedScore Method¶
Module: FacePad
Definition¶
Computes the PAD score of a detected face using a depth map image.
A high score means a high probability for the face to be bona-fide, hence not an attack.
The minimum recommended value is 10.
Important
Loading the FaceDepthBasedPad model is required to use this function.
compute_depth_based_score(self, image: Image, detected_face: DetectedFace) -> int
Parameters
imageImagein Source image to process. Must be Grayscale 16 Bits.detected_faceDetectedFacein Detected face to process.
Returns
intThe computed PAD score, in the range [0;100].
Exceptions
An error has occurred during Face Library execution.
int computeDepthBasedScore(Image image, DetectedFace detectedFace)
Parameters
imageImagein Source image to process. Must be Grayscale 16 Bits.detectedFaceDetectedFacein Detected face to process.
Returns
intThe computed PAD score, in the range [0;100].
Exceptions
An error has occurred during Face Library execution.
public int ComputeDepthBasedScore(Image image, DetectedFace detectedFace)
Parameters
imageImagein Source image to process. Must be Grayscale 16 Bits.detectedFaceDetectedFacein Detected face to process.
Returns
intThe computed PAD score, in the range [0;100].
Exceptions
An error has occurred during Face Library execution.
public int computeDepthBasedScore(Image image, DetectedFace detectedFace) throws FaceException
Parameters
imageImagein Source image to process. Must be Grayscale 16 Bits.detectedFaceDetectedFacein Detected face to process.
Returns
intThe computed PAD score, in the range [0;100].
Exceptions
An error has occurred during Face Library execution.
public func computeDepthBasedScore(image: Image, detectedFace: DetectedFace) throws -> Int32
Parameters
imageImagein Source image to process. Must be Grayscale 16 Bits.detectedFaceDetectedFacein Detected face to process.
Returns
IntThe computed PAD score, in the range [0;100].
Exceptions
An error has occurred during Face Library execution.
int id3FacePad_ComputeDepthBasedScore (
ID3_FACE_PAD hFacePad,
ID3_FACE_IMAGE hImage,
ID3_DETECTED_FACE hDetectedFace,
int * score)
Parameters
hFacePadID3_FACE_PADin Handle to the FacePad object.hImageID3_FACE_IMAGEin Source image to process. Must be Grayscale 16 Bits.hDetectedFaceID3_DETECTED_FACEin Detected face to process.scoreint *out The computed PAD score, in the range [0;100].
Returns