Face Age

Analyzes and predicts the age of a participant's face in a video stream. The face age is predicted within an age range. The event listener continuously obtains data in a JSON object as FaceAI analyzes the age of a face. If the prediction quality is poor, the event is not issued.

Method

To start or stop analyzing face age in a video stream.

  • Class: EnxFaceAI
  • Method: -(void)enableFaceAge:(BOOL)enable;

Parameter

  • enable : Boolean. Set it to true to enable or start the Face Age analysis. Otherwise, set it to false.

Delegate Method

  • FaceAI:didFaceAgeData:value : This method is received repeatedly with Face Age Analysis data as a JSON object.

JSON Object: Received with Face Age Analysis data.

{ output: {
age: {
-18: Number,
18-35: Number,
35-51: Number,
51-: Number
},
numericAge: Number
}
}

Analysis Data Explanation

  • output : Face Age Analysis Report
    • age : Filtered (smoothened) age prediction:
      • -18 : Probability Weightage suggesting less than 18 years old.
      • 18-35 : Probability Weightage suggesting between 18 to 35 years old.
      • 35-51 : Probability Weightage suggesting between 18 35 years old.
      • 51- : Probability Weightage suggesting equal or greater than 51 years old.
    • numericAge : Numeric. Estimated Age

Note: In case of poor quality of the prediction, the event is not fired (that is, it is skipped for the specified frame).

Sample Code

// Start Face Age
[FaceAI enableFaceAge:true];
- (void)FaceAI:(EnxFaceAI *_Nullable)FaceAI didFaceAgeData:(NSString *_Nullable)type value:(NSString *_Nullable)value{
}