Documentation
AI_Vision AI Effects
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • AI Effects
  • Guides
  • Face detection

Face detection

Last updated:2022-04-19 16:17

The ZegoEffects SDK provides a face detection function, which can detect all faces in a video and the positions of the faces in the video images.

Prerequisites

Before you begin to use the SDK's face detection feature in your project, make sure you complete the following steps:

  1. Integrate the ZegoEffects SDK into your project. For details, see Integration.
  2. Implement the basic image processing functionality. For details, see Implementation.
  3. Import the FaceDetectionModel. For details, see Import models.

Enable face detection

To use the face detection feature, import the model file FaceDetectionModel first; otherwise, this feature can't take effect. For details, see Import resources and models.

  1. Call the setEventHandler method to set the callback to return the face detection result.

    // Set the callback to return the face detection result.
    [self.effects setEventHandler:self]
  2. Call the enableFaceDetection method to enable the face detection feature.

    // Enable face detection.
    [self.effects enableFaceDetection:YES];
    
    -(void)effects:(ZegoEffects *)effects faceDetectionResults:(NSArray<ZegoEffectsFaceDetectionResult *> *)results{
        // Obtain the face detection result, including the number of faces, the confidence level of each detected face and its position.
    }
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code