What is the Azure Face API?

The Azure Face API is a cognitive service that provides algorithms for detecting, recognizing, and analyzing human faces in images. The ability to process human face information is important in many different software scenarios, such as security, natural user interface, image content analysis and management, mobile apps, and robotics.

The Face API provides several different functions, each outlined in the following sections. Read on to learn more about each one and determine if it suits your needs.

Face detection

The Face API can detect human faces in an image and return the rectangle coordinates of their locations. Optionally, face detection can extract a series of face-related attributes such as pose, gender, age, head pose, facial hair, and glasses.

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

The face detection feature is also available through the Computer Vision API, but if you wish to do further operations with face data, you should use the Face API (this service). For more information on face detection, see the Detect API.

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 is potentially useful in security scenarios. For more information, see the Verify API.

Find similar faces

The Find Similar API takes a target face and a set of candidate faces and finds a smaller set of faces that look most similar to the target face. Two working modes, matchPerson and matchFace are supported. matchPerson mode returns similar faces after filtering for the same person (using the Verify API). matchFace mode ignores the same-person filter and returns a list of similar candidate faces that may or may not belong to the same person.

In the following example, this is the target face:

A woman smiling

And these are the candidate faces:

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

To find four similar faces, matchPerson mode would return (a) and (b), which depict the same person as the target face. matchFace mode returns (a), (b), (c) and (d)—exactly four candidates, even if some are not the same person as the target or have low similarity. For more information, see the Find Similar API.

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, but there can be several different groups for a single person (differentiated by another factor, such as expression for example). For more information, see the Group API.

Person identification

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

The following image depicts an example of a database named "myfriends." Each group may contain up to 1,000,000 different person objects, and each person object can have up to 248 faces registered.

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

After a database has been 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 Identify API.

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 showcase a few of the ways the Face API can be used.

Next steps

Follow a quickstart to implement a simple face detection scenario in code.