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.
This document is no longer maintained. Use the new version of Intelligent Media Management.
For more information about the differences between the new and legacy versions of Intelligent Media Management, see Usage guide for new and old versions.
For more information about the face similarity comparison feature of the new version of Intelligent Media Management, see Face similarity comparison.
To use the face verification feature, call the following API operations in the specified order using an SDK for your preferred language.
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.
NoteYou can also create a project in the Intelligent Media Management console. For more information, see Create a project.
Choose a comparison method based on your requirements.
Compare two face IDs in a media set.
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.
Call the IndexImage API operation to index an image in the media set.
If you have multiple images, you can repeat this operation.
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.
Call the CompareImageFaces API operation to compare the two faces.