FacePad.computeColorBasedScore Method

Module: FacePad

Definition

Computes the PAD score and confidence of a detected face using only the color image.

A high score means a high probability for the face to be bona-fide, hence not an attack. The minimum recommended score is 90.

A low confidence means that the quality of the image is not sufficient enough to take a decision. The minimum recommended confidence is 70.

Warning

A minimum IOD (64 pixels per default) for the detected face is required for this function, below this value it will output an error.

Important

Loading the FaceColorBasedPad2A model is required to use this function.

compute_color_based_score(self, image: Image, detected_face: DetectedFace) -> ColorBasedPadResult

Parameters

image Image
in Source image to process.

detected_face DetectedFace
in Detected face to process.

Returns

The computed PAD result including score and confidence.

Exceptions

An error has occurred during Face Library execution.
ColorBasedPadResult computeColorBasedScore(Image image, DetectedFace detectedFace)

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The computed PAD result including score and confidence.

Exceptions

An error has occurred during Face Library execution.
public ColorBasedPadResult ComputeColorBasedScore(Image image, DetectedFace detectedFace)

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The computed PAD result including score and confidence.

Exceptions

An error has occurred during Face Library execution.
public ColorBasedPadResult computeColorBasedScore(Image image, DetectedFace detectedFace) throws FaceException

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The computed PAD result including score and confidence.

Exceptions

An error has occurred during Face Library execution.
public func computeColorBasedScore(image: Image, detectedFace: DetectedFace) throws -> ColorBasedPadResult

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The computed PAD result including score and confidence.

Exceptions

An error has occurred during Face Library execution.
int id3FacePad_ComputeColorBasedScore (
    ID3_FACE_PAD hFacePad,
    ID3_FACE_IMAGE hImage,
    ID3_DETECTED_FACE hDetectedFace,
    id3FaceColorBasedPadResult * sColorBasedPadResult)

Parameters

hFacePad ID3_FACE_PAD
in Handle to the FacePad object.

in Source image to process.

hDetectedFace ID3_DETECTED_FACE
in Detected face to process.

sColorBasedPadResult id3FaceColorBasedPadResult *
out The computed PAD result including score and confidence.

Returns

int
An error code.
See id3FaceError file for the list of possible error codes.