Documentation
AI_Vision AI Effects
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • AI Effects
  • Getting started
  • Import resources and models

Import resources and models

Last updated:2025-04-15 16:24

Introduction

Before you can use the AI features of the ZegoEffects SDK, you need to import the resources or models required for these features.

  • To use the features such as skin tone enhancement, teeth whitening, cheek blusher, and stickers, import the related resources first.
  • To use the features such as eyes enlarging, face slimming, and portrait segmentation, import the related models first.

Implementation steps

  1. Specify the absolute path of the AI ​​resources or models.

    // Specify the absolute path of the resources or models. Specify the absolute path of resources for the features such as skin tone enhancement, teeth whitening, cheek blusher, and stickers.  Specify the absolute path of models for the features such as portrait segmentation, eyes enlarging, and face slimming.
    ArrayList<String> aiResourcesInfos = new ArrayList<>();
    aiResourcesInfos.add("sdcard/xxx/xxxxx/FaceWhiteningResources.bundle");
    //Only versions before 2.0.0 support Stickers feature
    aiResourcesInfos.add("sdcard/xxx/xxxxx/PendantResources.bundle");
    aiResourcesInfos.add("sdcard/xxx/xxxxx/RosyResources.bundle");
    aiResourcesInfos.add("sdcard/xxx/xxxxx/TeethWhiteningResources.bundle");
    aiResourcesInfos.add("sdcard/xxx/xxxxx/FaceDetectionModel.model");
    aiResourcesInfos.add("sdcard/xxx/xxxxx/Segmentation.model");
  2. Before calling the create method to create a ZegoEffects object, call the setResources method to set the resource or model path list and load the resources and models.

    // Set the path list for resources or models, which must be called before calling the `create` method to create a ZegoEffects object.
    ZegoEffects.setResources(aiResourcesInfos);

Supported resources and models

The following table shows the resources and models that the SDK currently supports:

Resources Description Supported feature
FaceWhiteningResources Color lookup table resources for skin tone enhancement. Skin tone enhancement
PendantResources Sticker resources(Only versions before 2.0.0 support) Stickers
RosyResources Color lookup table resources for cheek blusher Cheek blusher
TeethWhiteningResources Color lookup table resources for teeth whitening Teeth whitening
FaceDetectionModel Face detection model Face detection, eyes enlarging, and face slimming
SegmentationModel Portrait segmentation model Portrait segmentation
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code