Use Cases
The diagrams in this section show possible use cases and connection between Face SDK objects. Input data is indicated in blue, data processors are indicated in green, and output data is indicated in purple.
Face Estimation in Video Stream
The standard option to estimate age, gender, and emotions in video stream is to use the VideoWorker
object. The Frames received from the Camera are passed to VideoWorker
object. As a result, the information about age, gender, and emotions is returned to VideoWorker::TrackingCallbackU
.
Face Estimation in Images
You can use this option if face estimation with VideoWorker
is not suitable for your case (for example, if you need to estimate faces in images). The Frames received from the Camera are passed to the Capturer
object, used to detect faces. Detected faces and information about them (RawSample
) are passed for further processing to the AgeGenderEstimator
and EmotionsEstimator
objects, which return age and gender and emotions respectively.
Database Creation
For face identification you need to create a template database (only once). Images are passed to the Capturer
object. Detected faces and information about them (RawSample
) are passed to the Recognizer
object, which returns biometric templates (Template
). The operation of receiving the templates is time-consuming. Therefore, there is a special tool, which lets you save a template to long-term memory (see the methods Template::save
, Recognizer::loadTemplate
).
Face Identification in Video Stream
The standard option to identify faces in video stream is to use the VideoWorker
object. The Frames received from the Camera are passed to VideoWorker
. If you use a 3D sensor, a Depth Map is also passed to VideoWorker
. The information about detected and recognized faces and created templates is returned in callbacks.
Face Identification (RGB Camera)
The Frames received from the Camera are passed to the Capturer
object, used to detect faces. Detected faces and information about them (RawSample
) and template database (TemplatesIndex
, see Database Creation) are passed to the Recognizer
object. Recognizer
extracts biometric templates from RawSample
and compares them with templates from the database.
Face Identification (with Liveness check)
This diagram is similar to the previous one, the only difference is a depth map received from a 3D Sensor. The depth map is passed to the DepthLivenessEstimator
object for Liveness estimation. If the returned status is REAL
, the detected faces and information about them (RawSample
) are passed for further processing to Recognizer
.