Face Gender

Analyzes the gender of a face in a video stream. The event listener continuously gets the data in a JSON object as FaceAI analyzes the face gender.


To start or stop analyzing the gender of a face in a video stream.

  • Class: EnxFaceAI
  • Method: public void enableFaceGender(boolean enable)


  • enable : Boolean. Set it to true to enable or start the analysis of face gender. Otherwise, set it to false.

Callback Method

  • onFaceGenderData : This method is received repeatedly with the Face Gender Analysis report as a JSON object.

JSON Object: Received with Face Gender Analysis data.

{ output: {
gender: {
Female: Number,
Male: Number
mostConfident: String

Analysis Data Explanation

  • output : Face Gender Report
    • gender : Filtered (smoothened) probabilities of the gender prediction:
      • Female : Probability weightage for gender is female
      • Male : Probability weightage for gender is male
    • mostConfident : Gender name of the most likely result if its smoothened probability is above the threshold, otherwise it is undefined.

Sample Code

enxFaceAI.enableFaceGender(true); // To start analysis
enxFaceAI.enableFaceGender(false); // To stop analysis
// Callback
public void onFaceGenderData(String type, String value) {