Spoof Detection

We are finding some limitations with a passive approach to spoof detection. Until we have an improved model we will mark this API method as deprecated. We will continue to support this implementation but want to make you aware that there will be an updated solution with different requirements.

Deprecated since version 0.17.

ErrorCode Trueface::SDK::detectSpoof(const FaceBoxAndLandmarks &faceBoxAndLandmarks, SpoofLabel &result, float &spoofScore, float threshold = 0.5)

Detect if there is a presentation attack attempt.

Parameters
  • faceBoxAndLandmarks[in] FaceBoxAndLandmarks returned by detectFaces() or detectLargestFace().

  • result[out] the SpoofLabel results for the face image.

  • spoofScore[out] the probability that the image is a spoof attempt (1 indicates real image, 0 indicates spoof attempt).

  • threshold[out] the spoof score threshold above which it is considered a spoof attempt.

Returns

error code, see ErrorCode.

enum Trueface::SpoofLabel

Results from spoof detection

Values:

enumerator REAL

The face image is real

enumerator FAKE

The image may be an attempted spoof