Face Estimation
In this section you will learn how to integrate Emotion and Gender estimators to your C++ project.
#
Emotion Estimation (C++)#
Requirements- Windows x86 64-bit or Linux x86 64-bit system.
- Installed Face SDK package windows_x86_64 or linux_x86_64 (see Getting Started).
#
1. Creating an Emotion Estimator1.1. To create an Emotion Estimator, follow steps 1-3 described in Creating a Processing Block and specify the values:
"EMOTION_ESTIMATOR"
for the"unit_type"
key;- path to Emotion Estimator model file for the
"model_path"
key.
1.2. Create an Emotion Estimator Processing block:
#
2. Emotion Estimation2.1. Create a Context container ioData
for input-output data using the createContext()
method:
2.2. Create a Context container imgCtx
with RGB-image following the steps described on
Creating a Context container with RGB-image.
2.3. Put input image to the input-output data container:
2.4. Call the emotionEstimator
and pass the context with source image ioData
:
The result of calling emotionEstimator()
will be appended to ioData
container.
The format of the output data is presented as a list of objects with the "objects"
key.
This list object has the "class"
key with the "face"
value.
#
3. GPU AccelerationEmotion Estimator can be used with GPU acceleration (CUDA). For more information, please follow this link.
#
Age Estimation (C++)#
Requirements- Windows x86 64-bit or Linux x86 64-bit system.
- Installed Face SDK package windows_x86_64 or linux_x86_64 (see Getting Started).
#
1. Creating a Age Estimator1.1. To create an Age Estimator, follow steps 1-3 described in Creating a Processing Block and specify the values:
"AGE_ESTIMATOR"
for the"unit_type"
key;- path to Age Estimator model file for the
"model_path"
key.
1.2. Create an Age Estimator Processing block:
#
2. Age Estimation2.1. Create a Context container ioData
for input-output data using the createContext()
method:
2.2. Create a Context container imgCtx
with RGB-image following the steps described on
Creating a Context container with RGB-image.
2.3. Put input image to the input-output data container:
2.4. Call the ageEstimator
and pass the context ioData
with source image:
The result of calling ageEstimator()
will be appended to ioData
container.
#
3. GPU AccelerationAge Estimator can be used with GPU acceleration (CUDA). For more information, please follow this link.
#
Gender Estimation (C++)#
Requirements- Windows x86 64-bit or Linux x86 64-bit system.
- Installed Face SDK package windows_x86_64 or linux_x86_64 (see Getting Started).
#
1. Creating a Gender Estimator1.1. To create a Gender Estimator, follow steps 1-3 described in Creating a Processing Block and specify the values:
"GENDER_ESTIMATOR"
for the"unit_type"
key;- path to Gender Estimator model file for the
"model_path"
key.
1.2. Create a Gender Estimator Processing block:
#
2. Gender Estimation2.1. Create a Context container ioData
for input-output data using the createContext()
method:
2.2. Create a Context container imgCtx
with RGB-image following the steps described on
Creating a Context container with RGB-image.
2.3. Put input image to the input-output data container:
2.4. Call the genderEstimator
and pass the context ioData
with source image:
The result of calling genderEstimator()
will be appended to ioData
container.
#
3. GPU AccelerationGender Estimator can be used with GPU acceleration (CUDA). For more information, please follow this link.
#
Mask Estimation (C++)#
Requirements- Windows x86 64-bit or Linux x86 64-bit system.
- Installed Face SDK package windows_x86_64 or linux_x86_64 (see Getting Started).
#
1. Creating a Mask Estimator1.1. To create a Mask Estimator, follow steps 1-3 described in Creating a Processing Block and specify the values:
"MASK_ESTIMATOR"
for the"unit_type"
key;- path to Age Estimator model file for the
"model_path"
key.
1.2. Create a Mask Estimator Processing block:
#
2. Mask Estimation2.1. Create a Context container ioData
for input-output data using the createContext()
method:
2.2. Create a Context container imgCtx
with RGB-image following the steps described on
Creating a Context container with RGB-image.
2.3. Put input image to the input-output data container:
2.4. Call the maskEstimator
and pass the context ioData
with source image:
The result of calling maskEstimator()
will be appended to ioData
container.
#
3. GPU AccelerationAge Estimator can be used with GPU acceleration (CUDA). For more information, please follow this link.