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.
- SDK.detect_spoof(self: tfsdk.SDK, face_box_and_landmarks: tfsdk.FaceBoxAndLandmarks, threshold: float = 0.5) → Tuple[tfsdk.ERRORCODE, tfsdk.SPOOFLABEL, float]¶
Detect if there is a spoof attempt. Returns the spoof score.
- Parameters
face_box_and_landmarks –
tfsdk.FaceBoxAndLandmarks
returned bytfsdk.SDK.detect_faces()
ortfsdk.SDK.detect_largest_face()
.threshold – the spoof score threshold above which it is considered a spoof attempt (default = 0.5).
- Returns
The
ERRORCODE
, thetfsdk.SPOOFLABEL
, and the spoof score, in that order.
- class tfsdk.SPOOFLABEL¶
Members:
FAKE : The image may be an attempted spoof
REAL : The face image is real