Face Attention

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


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

  • Class: EnxFaceAI
  • Method: - -(void)enableFaceAttention:(BOOL)enable


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

Delegate Method

  • -FaceAI:didFaceAttentionData:value : This method is received repeatedly with the Face Attention Analysis report as a JSON object.

JSON Object: Received with Face Attention Analysis data.

{ output: {
attention: Number

Analysis Data Explanation

  • output : Face Attention Report
    • attention : Filtered value (smoothened) in range [0.0, 1.0]. A value close to 1.0 represents attention, a value close to 0.0 represents distraction

Sample Code

// Start Face Attention
[FaceAI enableFaceAttention:true];
- (void)FaceAI:(EnxFaceAI *_Nullable)FaceAI didFaceAttentionData:(NSString *_Nullable)type value:(NSString *_Nullable)value{