Face comparison

更新时间:
复制 MD 格式

The face verification feature compares two faces to determine their similarity. You can compare two face IDs in a media set or the OSS URIs of two images. This feature can be used for identity verification.

Important

This document is no longer maintained. Use the new version of Intelligent Media Management.

To use the face verification feature, call the following API operations in the specified order using an SDK for your preferred language.

  1. Call the PutProject API operation to create a project.

    If you have already created a project, you can skip this step. To list all projects that are created in a specific region, call the ListProjects API operation.

    Note

    You can also create a project in the Intelligent Media Management console. For more information, see Create a project.

  2. Choose a comparison method based on your requirements.

    • Compare two face IDs in a media set.

      1. Call the CreateSet API operation to create a media set and obtain the media set ID (SetId).

        If a suitable media set already exists, you can skip this step. To retrieve information about all media sets in a project, call the ListSets API operation.

      2. Call the IndexImage API operation to index an image in the media set.

        If you have multiple images, you can repeat this operation.

      3. Call the GetImage or ListImages API operation to retrieve the face IDs that you want to compare.

    • Compare the OSS URIs of two images.

      Upload the two images to an OSS bucket. For more information, see Upload files using the console.

  3. Call the CompareImageFaces API operation to compare the two faces.