What is the Azure Face API?

The Azure Cognitive Services Face API provides algorithms that are used to detect, recognize, and analyze human faces in images. The ability to process human face information is important in many different software scenarios. Example scenarios are security, natural user interface, image content analysis and management, mobile apps, and robotics.

The Face API provides several different functions. Each function is outlined in the following sections. Read on to learn more about them.

Face detection

The Face API detects human faces in an image and returns the rectangle coordinates of their locations. Optionally, face detection can extract a series of face-related attributes. Examples are head pose, gender, age, emotion, facial hair, and glasses.

Note

The face detection feature is also available through the Computer Vision API. If you want to do further operations with face data, use the Face API, which is the service discussed in this article.

An image of a woman and a man, with rectangles drawn around their faces and age and gender displayed

For more information on face detection, see the Face detection concepts article. Also see the Detect API reference documentation.

Face verification

The Verify API performs an authentication against two detected faces or from one detected face to one person object. Practically, it evaluates whether two faces belong to the same person. This capability is potentially useful in security scenarios. For more information, see the Face recognition concepts guide or the Verify API reference documentation.

Find similar faces

The Find Similar API compares a target face with a set of candidate faces to find a smaller set of faces that look similar to the target face. Two working modes, matchPerson and matchFace, are supported. The matchPerson mode returns similar faces after it filters for the same person by using the Verify API. The matchFace mode ignores the same-person filter. It returns a list of similar candidate faces that might or might not belong to the same person.

The following example shows the target face:

A woman smiling

And these are the candidate faces:

Five images of people smiling. Images a and b show the same person.

To find four similar faces, the matchPerson mode returns a and b, which show the same person as the target face. The matchFace mode returns a, b, c, and d, exactly four candidates, even if some aren't the same person as the target or have low similarity. For more information, see the Face recognition concepts guide or the Find Similar API reference documentation.

Face grouping

The Group API divides a set of unknown faces into several groups based on similarity. Each group is a disjoint proper subset of the original set of faces. All of the faces in a group are likely to belong to the same person. There can be several different groups for a single person. The groups are differentiated by another factor, such as expression, for example. For more information, see the Face recognition concepts guide or the Group API reference documentation.

Person identification

The Identify API is used to identify a detected face against a database of people. This feature might be useful for automatic image tagging in photo management software. You create the database in advance, and you can edit it over time.

The following image shows an example of a database named "myfriends." Each group can contain up to 1 million different person objects. Each person object can have up to 248 faces registered.

A grid with three columns for different people, each with three rows of face images

After a database is created and trained, you can perform identification against the group with a new detected face. If the face is identified as a person in the group, the person object is returned.

For more information about person identification, see the Face recognition concepts guide or the Identify API reference documentation.

Use containers

Use the Face container to detect, recognize, and identify faces by installing a standardized Docker container closer to your data.

Sample apps

The following sample applications show a few ways to use the Face API:

Data privacy and security

As with all of the Cognitive Services resources, developers who use the Face service must be aware of Microsoft's policies on customer data. For more information, see the Cognitive Services page on the Microsoft Trust Center.

Next steps

Follow a quickstart to implement a face-detection scenario in code: