This page describes the SAFR Embedded SDK objects you use to detect and recognize objects.
A face detector instance allows you to detect faces in an image. All face detector APIs are synchronous. Parallelism/asynchronous behavior can be achieved by the caller by creating a thread and assigning the detector instance to that thread. This thread should then listen to detection requests and process them with the help of the face detector object.
A face detector instance is owned by a single thread. Only this thread may use the face detection services.
Two face detector types are supported.
Similar face attribute values are expected for both face detectors.
You can configure the resolution of the HighSensitivity face detector by setting the kEARFaceDetectionHighSensitivityResolutions
property. This property is similar to the minFaceSearchSize
configuration parameter of the Normal face detector in that it depends on expected face resolutions. Unlike minFaceSearchSize
, however, it's set when the face detector is initialized and can't be changed later on.
The default value for the HighSensitivity face detector resolution is 640x480: kEARFaceDetectionHighSensitivityResolutions_640_480
.
Enables liveness detection. If enabled, the face detector will produce two additional output values: liveness (i.e. liveness score) and livenessStatus. For liveness detection to output a score for a detected face, certain liveness thresholds must be satisfied. See the list of liveness thresholds and respective default values in EARFaceDetectionConfiguration
.
Liveness detection is supported only on high sensitivity face detector, kEARFaceDetectionType_HighSensitivity
.
A face recognizer instance allows you to recognize faces/persons in an image. All face recognizer APIs are synchronous. Parallelism/asynchronous behavior can be achieved by the caller by creating a thread and assigning the recognizer instance to that thread. This thread should then listen to recognition requests and process them with the help of the face recognizer object.
A face recognizer instance is owned by a single thread. Only this thread may use the face recognizer services.
The face recognizer supports two recognition models,
The face recognizer model has 2 options for optimizing performance.
A person store persistently stores information about a person. Every person is identified by a globally unique ID (UUID). Each person also has a signature the face recognizer generates. This signature property is an internal property that is not exposed to the user.
The user of the API may add arbitrary key-value pairs to a person. A key is always represented by a string, while a value is a sequence of arbitrary bytes. The person store does not interpret these bytes.
A single person store instance may be accessed from multiple threads at the same time.