Skip to content

Parameter Estimation Facility#

Overview#

Estimation facility is the only multi-purpose facility in FaceEngine. It is designed as a collection of tools that help to estimate various image or depicted object properties. These properties may be used to increase the precision of algorithms implemented by other FaceEngine facilities or to accomplish custom user tasks.

Face Attribute Estimation#

Note. The estimator is trained to work with warped images (see Chapter "Image warping" for details).

The Attribute estimator determines face attributes. Currently, the following attributes are available:

  • Age: determines person's age;
  • Gender: determinse person's gender;
  • Ethnicity: determines ethnicity of a person.

Before using attribute estimator, user is free to decide whether to estimate or not some specific attributes listed above through IAttributeEstimator::EstimationRequests structure, which later get passed in main estimate() method. Estimator overrides AttributeEstimationResults output structure, which consists of optional fields describing results of user requested attributes.

  • Age is reported in years:

    • For cooperative (see "Appendix B. Glossary") conditions: average error depends on person age, see the table below for additional details. Estimation precision is 2.3
  • For gender estimation 1 means male, 0 means female.

    • Estimation precision in cooperative mode is 99.81% with the threshold 0.5;
    • Estimation precision in non-cooperative mode is 92.5%.
  • Ethnicity estimation returns 4 float normalized values, each value describes probability of person's ethnicity.

    • Ethnicity Estimation precision in non-cooperative mode is 90.7%.
    • There are 4 types of races the estimator is currently able to distinguish: African American, Indian, Asian, Caucasian.
    • Estimates person's race depending on his/her appearance on a given image;
    • Outputs EthnicityEstimation structure with aforementioned data.

EthnicityEstimation displays races in scores that are presented as normalized float values in the range of [0..1]. The sum of scores always equals to 1. Each score stands for the probability of corresponding race.

"Average age estimation error per age group for cooperative conditions"

Age (years) Average error (years)
0-3 ±3.3
4-7 ±2.97
8-12 ±3.06
13-17 ±4.05
17-20 ±3.89
20-25 ±1.89
25-30 ±1.88
30-35 ±2.42
35-40 ±2.65
40-45 ±2.78
45-50 ±2.88
50-55 ±2.85
55-60 ±2.86
60-65 ±3.24
65-70 ±3.85
70-75 ±4.38
75-80 ±6.79

Note In earlier releases of Luna SDK Attribute estimator worked poorly in non-cooperative mode (only 56% gender estimation precision), and did not estimate child's age. Having solved these problems average estimation error per age group got a bit higher due to extended network functionality.

Color/Monochrome Estimation#

This estimator detects if an input image is grayscale or color. It implements estimate() function that accepts source image and outputs a Boolean, indicating if the image is grayscale (true) or not (false).

Image quality estimation#

Note. The estimator is trained to work with warped images (see Chapter "Image warping" for details).

The general rule of thumb for quality estimation:

  1. Detect a face, see if detection confidence is high enough. If not, reject the detection;
  2. Produce a warped face image (see chapter "Descriptor processing facility") using a face detection and its landmarks;
  3. Estimate visual quality using the estimator, finally reject low-quality images.

While the scheme above might seem a bit complicated, it is the most efficient performance-wise, since possible rejections on each step reduce workload for the next step.

At the moment estimator exposes two interface functions to predict image quality:

  • virtual Result estimate(const Image& warp, Quality& quality);
  • virtual Result estimate(const Image& warp, SubjectiveQuality& quality);

Each one of this functions use its own CNN internally and return slightly different quality criteria.

The first CNN is trained specifically on pre-warped human face images and will produce lower score factors if one of the following conditions are satisfied:

  • Image is blurred;
  • Image is under-exposured (i.e., too dark);
  • Image is over-exposured (i.e., too light);
  • Image color variation is low (i.e., image is monochrome or close to monochrome).

Each one of this score factors is defined in [0..1] range, where higher value corresponds to better image quality and vice versa.

Recommended thresholds for image quality of the first interface function are given below:

"saturationThreshold": 0.0; "blurThreshold": 0.93; "lightThreshold": 0.9; "darkThreshold": 0.9;

The second interface function output will produce lower factor if:

  • The image is blurred;
  • The image is underexposed (i.e., too dark);
  • The image is overexposed (i.e., too light);
  • The face in the image is illuminated unevenly (there is a great difference between light and dark regions);
  • Image contains flares on face (too specular).

The estimator determines the quality of the image based on each of the aforementioned parameters. For each parameter, the estimator function returns two values: the quality factor and the resulting verdict.

As with the first estimator function the second one will also return the quality factors in the range [0..1], where 0 corresponds to low image quality and 1 to high image quality. E. g., the estimator returns low quality factor for the Blur parameter, if the image is too blurry.

The resulting verdict is a quality output based on the estimated parameter. E. g., if the image is too blurry, the estimator returns “isBlurred = true”.

The threshold can be specified for each of the estimated parameters. The resulting verdict and the quality factor are linked through this threshold. If the received quality factor is lower than the threshold, the image quality is low and the estimator returns “true”. E. g., if the image blur quality factor is higher than the threshold, the resulting verdict is “false”.

If the estimated value for any of the parameters is lower than the corresponding threshold, the image is considered of bad quality. If resulting verdicts for all the parameters are set to "False" the quality of the image is considered good.

Examples are presented in the images below. Good quality images are shown on the right.

Blurred image (left), not blurred image (right)
Blurred image (left), not blurred image (right)
Dark image (left), good quality image (right)
Dark image (left), good quality image (right)
Light image (left), good quality image (right)
Light image (left), good quality image (right)
Image with uneven illumination (left), image with even illumination (right)
Image with uneven illumination (left), image with even illumination (right)
Image with specularity - image contains flares on face (left), good quality image (right)
Image with specularity - image contains flares on face (left), good quality image (right)

The quality factor is a value in the range [0..1] where 0 corresponds to low quality and 1 to high quality.

Note. Illumination uniformity corresponds to the face illumination in the image. The lower the difference between light and dark zones of the face, the higher the estimated value. When the illumination is evenly distributed throughout the face, the value is close to "1".

Note. Specularity is a face possibility to reflect light. The higher the estimated value, the lower the specularity and the better the image quality. If the estimated value is low, there are bright glares on the face.

Image quality parameters and their thresholds

Threshold Estimated property Recomended range Default value
blurThreshold Blur [0.57..0.65] 0.61
darknessThreshold Darkness [0.45..0.52] 0.50
lightThreshold Light [0.44..0.61] 0.57
illuminationThreshold Illumination uniformity [0..0.3] 0.1
specularityThreshold Specularity [0..0.3] 0.1

The most important parameters for face recognition are "blurThreshold", "darknessThreshold" and "lightThreshold", so you should select them carefully.

You can select images of better visual quality by setting higher values of the "illuminationThreshold" and "specularityThreshold". Face recognition is not greatly affected by uneven illumination or glares.

Eyes Estimation#

Note. The estimator is trained to work with warped images (see Chapter "Image warping" for details).

This estimator aims to determine:

  • Eye state: Open, Closed, Occluded;
  • Precise eye iris location as an array of landmarks;
  • Precise eyelid location as an array of landmarks.

You can only pass warped image with detected face to the estimator interface. Better image quality leads to better results.

Eye state classifier supports three categories: "Open", "Closed", "Occluded". Poor quality images or ones that depict obscured eyes (think eyewear, hair, gestures) fall into the "Occluded" category. It is always a good idea to check eye state before using the segmentation result.

The precise location allows iris and eyelid segmentation. The estimator is capable of outputting iris and eyelid shapes as an array of points together forming an ellipsis. You should only use segmentation results if the state of that eye is "Open".

The estimator:

  • Implements the estimate() function that accepts warped source image (see Chapter "Image warping") and warped landmarks, either of type Landmarks5 or Landmarks68. The warped image and landmarks are received from the warper (see IWarper::warp());
  • Classifies eyes state and detects its iris and eyelid landmarks;
  • Outputs EyesEstimation structures.

Note. Orientation terms 'left' and 'right' refer to the way you see the image as it is shown on the screen. It means that left eye is not necessarily left from the person's point of view, but is on the left side of the screen. Consequently, right eye is the one on the right side of the screen. More formally, the label 'left' refers to subject\'s left eye (and similarly for the right eye), such that xright < xleft.

EyesEstimation::EyeAttributes presents eye state as enum EyeState with possible values: Open, Closed, Occluded.

Iris landmarks are presented with a template structure Landmarks that is specialized for 32 points.

Eyelid landmarks are presented with a template structure Landmarks that is specialized for 6 points.

Head pose estimation#

This estimator is designed to determine camera-space head pose. Since 3D head translation is hard to determine reliably without camera-specific calibration, only 3D rotation component is estimated.

There are two head pose estimation method available:

  • Estimate by 68 face-aligned landmarks (you may get it from Detector facility, see Chapter "Detection facility") ;
  • Estimate by original input image in RGB format.

Estimation by image is more precise. If you have already extracted 68 landmarks for another facilities you may save time, and use fast estimator from 68 landmarks.

By default, all methods are available to use in config (faceengine.conf) in section "HeadPoseEstimator". You may disable these methods to decrease RAM usage and initialization time.

Estimation characteristics:

  • Units (degrees);
  • Notation (Euler angles);
  • Precision (see the table below).

Note. Prediction precision decreases as a rotation angle increases. We present typical average errors for different angle ranges in the table below.

"Head pose prediction precision"

Range -45°...+45° < -45° or > +45°
Average prediction error (per axis) Yaw ±2.7° ±4.6°
Average prediction error (per axis) Pitch ±3.0° ±4.8°
Average prediction error (per axis) Roll ±3.0° ±4.6°

Zero position corresponds to a face placed orthogonally to camera direction, with the axis of symmetry parallel to the vertical camera axis. See the image below for a reference.

Head pose
Head pose

Note. In order to work, this estimator requires precise 68-point face alignment results, so familiarize with section "Face alignment" in the "Detection facility" chapter as well.

Gaze Estimation#

This estimator is designed to determine gaze direction relatively to head pose estimation. Since 3D head translation is hard to determine reliably without camera-specific calibration, only 3D rotation component is estimated.

Estimation characteristics:

  • Units (degrees);
  • Notation (Euler angles);
  • Precision (see the table below).

Note. Roll angle is not estimated, prediction precision decreases as a rotation angle increases. We present typical average errors for different angle ranges in the table below.

"Gaze prediction precision"

Range -25°...+25° -25° ... -45 ° or 25 ° ... +45°
Average prediction error (per axis) Yaw ±2.7° ±4.6°
Average prediction error (per axis) Pitch ±3.0° ±4.8°

Zero position corresponds to a gaze direction orthogonally to face plane, with the axis of symmetry parallel to the vertical camera axis. See figure Head pose estimation for a reference.

Smile Estimation#

This estimator is designed to determine smile/mouth/occlusion probability using warped face image.

Smile estimation structure consists of:

  • Smile score;
  • Mouth score;
  • Occlusion score.

Sum of scores always equals 1. Each score means probability of corresponding state. Smile score prevails in cases where smile was successfully detected. If there is any object on photo that hides mouth occlusion score prevails. Mouth score prevails in cases where neither a smile nor an occlusion was detected.

Mouth Estimation#

This estimator is designed to predict person's mouth state. It returns the following bool flags:

  • isOpened;
  • isOccluded;
  • isSmiling.

Each of this flags indicate specific mouth state that was predicted.

The combined mouth state is assumed if multiple flags are set to true. For example there are many cases where person is smiling and its mouth is wide open.

Similar to smile estimator mouth estimator provides score probabilities for mouth states in case user need more detailed information:

  • Mouth opened score;
  • Smile score;
  • Occlusion score.

Note: This estimator is trained to work with warped images (see Chapter "Image warping" for details).

Emotions Estimation#

Note: The estimator is trained to work with warped images (see Chapter "Image warping" for details).

This estimator aims to determine whether a face depicted on an image expresses the following emotions:

  • Anger
  • Disgust
  • Fear
  • Happiness
  • Surprise
  • Sadness
  • Neutrality

You can pass only warped images with detected faces to the estimator interface. Better image quality leads to better results.

The estimator (see IEmotionsEstimator in IEstimator.h):

  • Implements the estimate() function that accepts warped source image (see Chapter "Image warping"). Warped image is received from the warper (see IWarper::warp());
  • Estimates emotions expressed by the person on a given image;
  • Outputs EmotionsEstimation structure with aforementioned data.

EmotionsEstimation presents emotions as normalized float values in the range of [0..1] where 0 is lack of a specific emotion and 1 is the maximum intensity of an emotion.

Approximate Garbage Score Estimation (AGS)#

This estimator aims to determine the source image score for further descriptor extraction and matching. The higher the score, the better matching result is received for the image.

When you have several images of a person, it is better to save the image with the highest AGS score.

Consult VisionLabs about the recommended threshold value for this parameter.

The estimator (see IAGSEstimator in IEstimator.h):

  • Implements the estimate() function that accepts source image in R8G8B8 format and fsdk::Detection structure of corresponding source image (see section "Detection structure" in chapter "Detection facility");
  • Estimates garbage score of input image;
  • Outputs garbage score value.

Glasses Estimation#

Glasses estimator is designed to determine whether a person is currently wearing any glasses or not. There are 3 types of states estimator is currently able to estimate:

  • NoGlasses state determines whether a person is wearing any glasses at all;
  • EyeGlasses state determines whether a person is wearing eyeglasses;
  • SunGlasses state determines whether a person is wearing sunglasses.

Note. Source input image must be warped in order for estimator to work properly (see Chapter "Image warping"). Quality of estimation depends on threshold values located in faceengine configuration file (faceengine.conf ) in GlassesEstimator::Settings section. By default, these threshold values are set to optimal.

The table below contains true positive rates corresponding to selected false positive rates.

"Glasses estimator TPR/FPR rates"

State TPR FPR
NoGlasses 0.997 0.00234
EyeGlasses 0.9768 0.000783
SunGlasses 0.9712 0.000383

Overlap Estimation#

This estimator tells whether the face is overlapped by any object. It returns a structure with 2 fields. One is the value of overlapping in the range [0..1] where 0 is not overlapped and 1.0 is overlapped, the second is a Boolean answer. A Boolean answer depends on the threshold listed below. If the value is greater than the threshold, the answer returns true, else false.

The estimator (see IOverlapEstimator in IEstimator.h):

  • Implements the estimate() function that accepts source image in R8G8B8 format and fsdk::Detection structure of corresponding source image (see section "Detection structure");
  • Estimates whether the face is overlapped by any object on input image;
  • Outputs structure with value of overlapping and Boolean answer.

Child Estimation#

This estimator tells whether the person is child or not. Child is a person who younger than 18 years old. It returns a structure with 2 fields. One is the score in the range from 0.0 (is adult) to 1.0 (maximum, is child), the second is a boolean answer. Boolean answer depends on the threshold in config (faceengine.conf). If the value is more than the threshold, the answer is true (person is child), else - false (person is adult).

The estimator (see IChildEstimator in IEstimator.h):

  • Implements the estimate() function accepts warped source image (see chapter "Image warping"). Warped image is received from the warper (see IWarper::warp());
  • Estimates whether the person is child or not on input warped image;
  • Outputs ChildEstimation structure. Structure consists of score of and boolean answer.

BestShotQuality Estimation#

The BestShotQuality estimator represents a collection of estimator functionalities unified for end-user convenience.

Estimation types that were merged into this estimator are described in the following list:

Before using this estimator, user is free to decide whether to estimate or not some specific attributes listed above through IBestShotQualityEstimator::EstimationRequests structure, which later get passed in main estimate() method.

Estimator overrides AQEEstimationResults output structure, which consists of optional fields describing results of user requested attributes.

HeadAndShouldersLiveness Estimation#

This estimator tells whether the person's face is real or fake (photo, printed image) and confirms presence of a person's body in the frame. Face should be in the center of the frame and the distance between the face and the frame borders should be three times greater than space that face takes up in the frame. Both person's face and chest have to be in the frame. Camera should be placed at the waist level and directed from bottom to top. The estimator check for borders of a mobile device to detect fraud. So there should not be any rectangular areas within the frame (windows, pictures, etc.).

The estimator (see IHeadAndShouldersLiveness in IEstimator.h):

  • Implements the estimateHeadLiveness() function that accepts source image in R8G8B8 format and fsdk::Detection structure of corresponding source image (see section "Detection structure" in chapter "Detection facility").
  • Estimates whether it is a real person or not. Outputs float normalized score in range [0..1], 1 - is real person, 0 - is fake. Implements the estimateShouldersLiveness() function that accepts source image in R8G8B8 format and fsdk::Detection structure of corresponding source image (see section "Detection structure" in chapter "Detection facility"). Estimates whether real person or not. Outputs float score normalized in range [0..1], 1 - is real person, 0 - is fake.

LivenessFlyingFaces Estimation#

This estimator tells whether the person's face is real or fake (photo, printed image).

The estimator (see ILivenessFlyingFacesEstimator in IEstimator.h):

  • Implements the estimate() function that needs fsdk::Face with valid image in R8G8B8 format and detection structure of corresponding source image (see section "Detection structure" in chapter "Detection facility"). This method estimates whether a real person or not. Output estimation with float score is normalized in range [0..1], where 1 - is real person, 0 - is fake.
  • Implements the estimate() function that needs the span of fsdk::Faces with valid source images in R8G8B8 formats and fsdk::Detection structures of corresponding source images (see section "Detection structure" in chapter "Detection facility"). Each element of span of fsdk::Face must be with valid image and detection. This method estimates whether different persons are real or not. Corresponding estimation output with float scores which are normalized in range [0..1], where 1 - is real person, 0 - is fake.

LivenessRGBM Estimation#

This estimator tells whether the person's face is real or fake (photo, printed image).

The estimator (see ILivenessRGBMEstimator in IEstimator.h):

  • Implements the estimate() function that needs fsdk::Face with valid image in R8G8B8 format, detection structure of corresponding source image (see section "Detection structure" in chapter "Detection facility") and fsdk::Image with accumulated background. This method estimates whether a real person or not. Output estimation structure contains the float score and boolean result. The float score normalized in range [0..1], where 1 - is real person, 0 - is fake. The boolean result has value true for real person and false otherwise.
  • Implements the update() function that needs the fsdk::Image with current frame , number of that image and previously accumulated background. The accumulated background will be overwritten by this call.

Medical Mask Estimation#

This estimator aims to detect a medical face mask on the face in the source image. It can return the next results:

  • A medical mask is on the face (see MedicalMask::Mask field in the MedicalMask enum);
  • There is no medical mask on the face (see MedicalMask::NoMask field in the MedicalMask enum);
  • The face is occluded with something (see MedicalMask::OccludedFace field in the MedicalMask enum);

The estimator (see IMedicalMaskEstimator in IEstimator.h):

  • Implements the estimate() function that accepts source warped image in R8G8B8 format and MedicalMaskEstimation structure to return results of estimation;
  • Implements the estimate() function that accepts source image in R8G8B8 format, face detection to estimate and MedicalMaskEstimation structure to return results of estimation;
  • Implements the estimate() function that accepts fsdk::Span of the source warped images in R8G8B8 format and fsdk::Span of the MedicalMaskEstimation structures to return results of estimation;
  • Implements the estimate() function that accepts fsdk::Span of the source images in R8G8B8 format, fsdk::Span of face detections and fsdk::Span of the MedicalMaskEstimation structures to return results of the estimation.

The estimator was implemented for two use-cases:

  1. When the user already has warped images. For example, when the medical mask estimation is performed right before (or after) the face recognition;
  2. When the user has face detections only.

Note: Calling the estimate() method with warped image and the estimate() method with image and detection for the same image and the same face could lead to different results.

MedicalMaskEstimator thresholds#

The estimator returns several scores - one for each possible result. The final result calculated based on that scores and thresholds. If some score is above the corresponding threshold, that result is estimated as final. The default values for all thresholds are taken from the configuration file. See Configuration guide for details.

MedicalMask enumeration#

The MedicalMask enumeration contains all possible results of the MedicalMask estimation:

    enum class MedicalMask {
        Mask = 0,                 //!< medical mask is on the face
        NoMask,                   //!< no medical mask on the face
        OccludedFace              //!< face is occluded by something
    };

MedicalMaskEstimation structure#

The MedicalMaskEstimation structure contains results of the estimation:

    struct MedicalMaskEstimation {
        MedicalMask result;        //!< estimation result (@see MedicalMask enum)
        // scores
        float maskScore;          //!< medical mask is on the face score
        float noMaskScore;        //!< no medical mask on the face score
        float occludedFaceScore;  //!< face is occluded by something score
    };

There are two groups of the fields:

  1. The first group contains only the result enum:
        MedicalMask result;

Result enum field MedicalMaskEstimation contain the target results of the estimation.

  1. The second group contains scores:
        float maskScore;          //!< medical mask is on the face score
        float noMaskScore;        //!< no medical mask on the face score
        float occludedFaceScore;  //!< face is occluded by something score

The scores group contains the estimation scores for each possible result of the estimation. All scores are defined in [0,1] range. They can be useful for users who want to change the default thresholds for this estimator. If the default thresholds are used, the group with scores could be just ignored in the user code.

Credibility Check Estimation#

This estimator estimates reliability of a person.

The estimator (see ICredibilityCheckEstimator in IEstimator.h):

  • Implements the estimate() function that accepts warped image in R8B8G8 format and fsdk::CredibilityCheckEstimation structure.
  • Implements the estimate() function that accepts span of warped images in R8B8G8 format and span of fsdk::CredibilityCheckEstimation structures.

Note. The estimator is trained to work with face images that meet the following requirements:

"Requirements for fsdk::HeadPoseEstimation"

Attribute Acceptable angle range(degrees)
pitch [-20...20]
yaw [-20...20]
roll [-20...20]

"Requirements for fsdk::SubjectiveQuality"

Attribute Minimum value
blur 0.61
light 0.57

"Requirements for fsdk::AttributeEstimationResult"

Attribute Minimum value
age 18

"Requirements for fsdk::OverlapEstimation"

Attribute State
overlapped false

"Requirements for fsdk::Detection"

Attribute Minimum value
detection size 100

Note. Detection size is detection width.

const fsdk::Detection detection = ... // somehow get fsdk::Detection object
const int detectionSize = detection.rect.width;

LivenessIREstimation Estimation#

This estimator tells whether the person's face is real or fake (photo, printed image).

The estimator (see ILivenessIREstimator in IEstimator.h):

  • Implements the estimate() function that accepts warped image in R8G8B8, R16 or IR_X8X8X8 format and fsdk::IREstimation structure.
  • Implements the estimate() function that accepts span of warped images in R8G8B8, R16 or IR_X8X8X8 format and span of fsdk::IREstimation structures.

Note. The estimator for Verme camera is trained to work with face images that meet the following requirements:

"Requirements for fsdk::HeadPoseEstimation"

Attribute Acceptable angle range(degrees)
pitch [-20...20]
yaw [-20...20]
roll [-20...20]

"Requirements for fsdk::SubjectiveQuality"

Attribute Minimum value
blur 0.4
light 0.1
darkness 0.3
illumination 0.6
specularity 0.5

"Requirements for fsdk::EyesEstimation"

Attribute State
left eye fsdk::EyesEstimation::EyeAttributes::State::Open
right eye fsdk::EyesEstimation::EyeAttributes::State::Open

"Requirements for fsdk::Detection"

Attribute Minimum value
detection size 160

Note. Detection size is detection width.

const fsdk::Detection detection = ... // somehow get fsdk::Detection object
const int detectionSize = detection.rect.width;

Facial Hair Estimation#

This estimator aims to detect a facial hair type on the face in the source image. It can return the next results:

  • There is no hair on the face (see FacialHair::NoHair field in the FacialHair enum);
  • There is stubble on the face (see FacialHair::Stubble field in the FacialHair enum);
  • There is mustache on the face (see FacialHair::Mustache field in the FacialHair enum);
  • There is beard on the face (see FacialHair::Beard field in the FacialHair enum);

The estimator (see IFacialHairEstimator in IFacialHairEstimator.h):

  • Implements the estimate() function that accepts source warped image in R8G8B8 format and FacialHairEstimation structure to return results of estimation;
  • Implements the estimate() function that accepts fsdk::Span of the source warped images in R8G8B8 format and fsdk::Span of the FacialHairEstimation structures to return results of estimation.

FacialHair enumeration#

The FacialHair enumeration contains all possible results of the FacialHair estimation:

    enum class FacialHair {
        NoHair = 0,                 //!< no hair on the face
        Stubble,                    //!< stubble on the face
        Mustache,                   //!< mustache on the face
        Beard                       //!< beard on the face
    };

FacialHairEstimation structure#

The FacialHairEstimation structure contains results of the estimation:

    struct FacialHairEstimation {
        FacialHair result;          //!< estimation result (@see FacialHair enum)
        // scores
        float noHairScore;          //!< no hair on the face score
        float stubbleScore;         //!< stubble on the face score
        float mustacheScore;        //!< mustache on the face score
        float beardScore;           //!< beard on the face score
    };

There are two groups of the fields:

  1. The first group contains only the result enum:
        FacialHair result;          //!< estimation result (@see FacialHair enum)

Result enum field FacialHairEstimation contain the target results of the estimation.

  1. The second group contains scores:
        float noHairScore;          //!< no hair on the face score
        float stubbleScore;         //!< stubble on the face score
        float mustacheScore;        //!< mustache on the face score
        float beardScore;           //!< beard on the face score

The scores group contains the estimation scores for each possible result of the estimation. All scores are defined in [0,1] range. Sum of scores always equals 1.

Note. The estimator is trained to work with face images that meet the following requirements:

"Requirements for fsdk::HeadPoseEstimation"

Attribute Acceptable angle range(degrees)
pitch [-40...40]
yaw [-40...40]
roll [-40...40]

"Requirements for fsdk::MedicalMaskEstimation"

Attribute State
result fsdk::MedicalMask::NoMask

"Requirements for fsdk::Detection"

Attribute Minimum value
detection size 40

Note. Detection size is detection width.

const fsdk::Detection detection = ... // somehow get fsdk::Detection object
const int detectionSize = detection.rect.width;
Back to top