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.

Return

error code, see ErrorCode.

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

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

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

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

enum Trueface::SpoofLabel

Results from spoof detection

Values:

enumerator REAL

The face image is real

enumerator FAKE

The image may be an attempted spoof