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

DeepSight SDK person class. More...

Classes

struct  Headpose
 Headpose structure for holding head rotation information. More...
 

Public Attributes

unsigned int ID { 0 }
 Unique identifying number assigned by the tracker. More...
 
int age { -1 }
 Estimated age in years.
 
float ageDeviation { 0.0f }
 The standard deviation for the expected age. 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...
 
float detectionConfidence { 0.0f }
 The certainty the SDK has about the detection being a face, value in the range [0, 1].
 
bool isLooking { 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.
 
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 was detected during ds::DeepSight::analyze or ds::DeepSight::analyzeSingleImage.
 
std::chrono::milliseconds detectionDuration { 0 }
 Total time elapsed since person was detected; also includes non-looking periods. More...
 
std::chrono::milliseconds totalAttentionDuration { 0 }
 Amount of time (cumulative over all attention periods) this person has spent looking towards the camera. More...
 
std::chrono::milliseconds currentAttentionDuration { 0 }
 Length of current attention 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 class.

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

Member Data Documentation

◆ ageDeviation

int ds::Person::ageDeviation { 0.0f }

The standard deviation for the expected age.

As a property of the standard deviation in a normal distribution, you have the 68–95–99.7 rule. This means that, given the age estimate ds::Person::age (age) and its standard deviation ds::Person::ageDeviation (stddev), the confidence of the age estimation can be computed as:

  • 68% confidence that the real person's age is between [age - stddev, age + stddev]
  • 95% confidence that the real person's age is between [age - (2x stddev), age + (2x stddev)]
  • 99.7% confidence that the real person's age is between [age - (3x stddev), age + (3x stddev)]

As an example, if the age estimation is 45 and the standard deviation is 3, then you'll have

  • 68% confidence that the real person's age is between 42 and 48
  • 95% confidence that the real person's age is between 39 and 51
  • 99.7% confidence that the real person's age is between 36 and 54

◆ currentAttentionDuration

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

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

Note
This duration is computed only when tracking is enabled.

◆ 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.

◆ detectionDuration

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

Total time elapsed since person was detected; also includes non-looking periods.

Note
This duration is computed only when tracking is enabled.

◆ 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).

◆ 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.

◆ ID

int ds::Person::ID { 0 }

Unique identifying number assigned by the 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).

◆ totalAttentionDuration

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

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

Note
This duration is computed only when tracking is enabled.

◆ 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.

◆ 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.