1:N face search
The Alibaba Cloud Visual Intelligence API provides Artificial Intelligence (AI) services for face and body recognition. Most of its APIs can be used individually. The 1:N face search API, however, requires a combination of multiple API calls. This document explains how to use these APIs together to perform a face search.
Development process
Create a face database. For more information, see Create a face database.
Add a face sample. For more information, see Add a face sample.
Add face data. For more information, see Add face data.
Search for a face. For more information, see Face search.
Cross-video face matching workflow
This workflow matches faces detected in different videos against existing entities in the face database and assigns them to the corresponding person.
Create a face database: Call the
CreateFaceDboperation to create a database for storing face data. Each Alibaba Cloud account can create up to 10 face databases, and each database supports up to 50,000 face images.Create a person entity: Call the
AddFaceEntityoperation to create an entity (EntityId) for each known person. TheAddFaceoperation requiresEntityIdas a mandatory parameter, so this step must be completed before adding face data.Add face data: Call the
AddFaceoperation to add faces detected in video frames to the database under the corresponding entity. The operation returns aFaceIdand an image quality score (QualityScore). A low quality score may cause the face to fail matching.Search for matches: Call the
SearchFaceoperation to search for a new face image against the database. The operation returns the best-matchingEntityIdand a confidence level (Confidence). Use the result to assign the face to the corresponding person.
Calling sequence: CreateFaceDb → AddFaceEntity → AddFace → SearchFace. Step 2 is a mandatory prerequisite. Skipping it causes the AddFace call to fail.
Code development
Create a face database. For details, see Create a face database sample code.
Add a face sample. For details, see Add a face sample sample code.
Add face data. For details, see Add face data sample code.
Search for a face. For details, see Face search sample code.
FAQ
How is this product billed?
For the 1:N face search feature, only calls to the SearchFace API are billed. The other APIs are free to call. For more information, see Billing.