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 analyze the gender of a face in a video stream.

Method: EnxFaceAI.startFaceGender(callback)


  • callback : Callback to know that processing request has been accepted.

Event Listener

  • face-gender : This event notification 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

// Start Face Gender
faceAI.startFaceGender((res) => {
if (res.result === 0)
window.addEventListener("face-gender", (evt) => {
console.log(evt.detail, "face-gender");