DeepSight SDK  3.0.0
DeepSight SDK - crowd face analysis
ds::Person Class Reference

DeepSight SDK person's face class. More...

Classes

struct  Emotions
 Emotion structure for holding facial expression information. More...
 
struct  Headpose
 Headpose structure for holding head rotation information. More...
 

Public Attributes

unsigned int ID { 0 }
 Unique identifying number assigned by the face tracker. More...
 
int age { -1 }
 Estimated age in years. More...
 
float gender { 0.0f }
 Estimated gender in the range [-1, 1]. More...
 
float smile { -1.0f }
 Smile intensity in the range [0, 1]. More...
 
float faceMask { -1.0f }
 The certainty the SDK has on the detected face about wearing a face mask, value in the range [0, 1]. More...
 
Emotions emotions { -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f }
 Person's facial expressions expressed as a combination of the 7 basic emotions: happiness, sadness, fear, disgust, anger, surprise, neutral. More...
 
float detectionConfidence { 0.0f }
 The certainty the SDK has about the detection being a face, value in the range [0, 1].
 
bool isViewing { false }
 Indicates if the person is currently looking towards the camera.
 
bool isDwelling { false }
 Indicates if the camera is within the field of view of the person.
 
cv::Rect boundingBox { 0, 0, 0, 0 }
 A rectangle expressing the pixel coordinates of the person's face within the analyzed frame.
 
cv::Point3i worldPosition { 0, 0, 0 }
 Head position 3D coordinates relative to the camera, expressed in centimeters. More...
 
Headpose headpose { -360, -360, -360 }
 Head rotation expressed in yaw, pitch and roll degree angles. More...
 
cv::Point2i headgaze { 0, 0 }
 Estimated head gaze from a person with respect to the camera, expressed in centimeters. More...
 
int distanceFromCamera { 0 }
 Estimated distance of a detected person (face) to the camera, in centimeters.
 
std::chrono::system_clock::time_point detectionTime { }
 Point in time at which this person's face was detected during ds::DeepSight::analyze or ds::DeepSight::analyzeSingleImage.
 
std::chrono::milliseconds detectionDuration { 0 }
 Total time elapsed since person's face was first detected; also includes non-viewing periods. More...
 
std::chrono::milliseconds totalViewingDuration { 0 }
 Amount of time (cumulative over all viewing periods) this person has spent looking towards the camera. More...
 
std::chrono::milliseconds currentViewingDuration { 0 }
 Length of current viewing span; increments when person is looking towards the camera. More...
 
std::chrono::milliseconds totalDwellDuration { 0 }
 Amount of time (cumulative) the camera has been within the field of view of the person. More...
 
std::chrono::milliseconds currentDwellDuration { 0 }
 Length of current dwelling time; increments when the camera is within the field of view of the person. More...
 

Detailed Description

DeepSight SDK person's face class.

The ds::Person class stores the results of a person's face analysis.

Member Data Documentation

◆ age

int ds::Person::age { -1 }

Estimated age in years.

The value -1 means that it was not possible to estimate the age.

◆ currentDwellDuration

std::chrono::milliseconds ds::Person::currentDwellDuration { 0 }

Length of current dwelling time; increments when the camera is within the field of view of the person.

Note
This duration is computed only when tracking is enabled.

◆ currentViewingDuration

std::chrono::milliseconds ds::Person::currentViewingDuration { 0 }

Length of current viewing span; increments when person is looking towards the camera.

Note
This duration is computed only when tracking is enabled.

◆ detectionDuration

std::chrono::milliseconds ds::Person::detectionDuration { 0 }

Total time elapsed since person's face was first detected; also includes non-viewing periods.

Note
This duration is computed only when tracking is enabled.

◆ emotions

ds::Person::Emotions ds::Person::emotions { -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f }

Person's facial expressions expressed as a combination of the 7 basic emotions: happiness, sadness, fear, disgust, anger, surprise, neutral.

All emotions set to -1 means that it was not possible to estimate the emotions.

◆ faceMask

float ds::Person::faceMask { -1.0f }

The certainty the SDK has on the detected face about wearing a face mask, value in the range [0, 1].

The face mask confidence is indicated in the range 0 (not wearing a mask) to 1 (wearing a mask). The value -1 means that it was not possible to estimate if the person is wearing a face mask.

◆ gender

float ds::Person::gender { 0.0f }

Estimated gender in the range [-1, 1].

The gender of a person is expressed as a floating number in the range of values between -1 and 1, where -1 means male, 1 means female and 0 means uncertain.

◆ headgaze

cv::Point2i ds::Person::headgaze { 0, 0 }

Estimated head gaze from a person with respect to the camera, expressed in centimeters.

The cv::Point2i x and y coordinates are defined as a position in the same plane as the camera-lens with the camera position at its origin. The values are expressed in centimeters.

◆ headpose

ds::Person::Headpose ds::Person::headpose { -360, -360, -360 }

Head rotation expressed in yaw, pitch and roll degree angles.

When all the angles are -360, it means that it was not possible to estimate the head pose.

◆ ID

unsigned int ds::Person::ID { 0 }

Unique identifying number assigned by the face tracker.

An ID gets assigned by the SDK tracker during the ds::DeepSight::analyse call. ds::Person objects with the same ID are considered by the SDK as the same person. This allows a person to be tracked along consecutive frames. ds::Person objects returned by ds::DeepSight::analyzeSingleImage have the ID set to 0.

◆ smile

float ds::Person::smile { -1.0f }

Smile intensity in the range [0, 1].

The smile intensity is indicated in the range 0 (not smiling) to 1 (full smile). The value -1 means that it was not possible to estimate the smile quantity.

◆ totalDwellDuration

std::chrono::milliseconds ds::Person::totalDwellDuration { 0 }

Amount of time (cumulative) the camera has been within the field of view of the person.

Note
This duration is computed only when tracking is enabled.

◆ totalViewingDuration

std::chrono::milliseconds ds::Person::totalViewingDuration { 0 }

Amount of time (cumulative over all viewing periods) this person has spent looking towards the camera.

Note
This duration is computed only when tracking is enabled.

◆ worldPosition

cv::Point3i ds::Person::worldPosition { 0, 0, 0 }

Head position 3D coordinates relative to the camera, expressed in centimeters.

Holds estimate distances (relative to the camera) of a detected person's head along the x-, y-, and z-axis respectively. Distances are expressed in centimeters; the positive x-axis points to the "right", the positive y-axis points "up", and the positive z-axis points "into" the screen.