What is the Face API Service?
Welcome to the Face API Service, a cloud-based service that provides the most advanced face algorithms. Face API has two main functions: face detection with attributes and face recognition.
Face API detects up to 64 human faces with high precision face location in an image. And the image can be specified by file in bytes or valid URL.
Face rectangle (left, top, width, and height) indicating the face location in the image is returned along with each detected face. Optionally, face detection extracts a series of face-related attributes such as pose, gender, age, head pose, facial hair, and glasses. For more information, see Face - Detect.
Face recognition is widely used in many scenarios including security, natural user interface, image content analysis and management, mobile apps, and robotics. Four face recognition functions are provided: face verification, finding similar faces, face grouping, and person identification.
Face API verification performs an authentication against two detected faces or authentication from one detected face to one person object. For more detailed information, see Face - Verify.
Finding Similar Face
Given a target detected face and a set of candidate faces to search with, the service finds a small set of faces that look most similar to the target face. Two working modes,
matchPerson are supported.
matchPerson mode returns similar faces after applying a same-person threshold derived from Face - Verify.
matchFace mode ignores the same-person threshold and returns top similar candidate faces. Take the following example, candidate faces are listed.
And query face is
To find four similar faces,
matchPerson mode returns (a) and (b), which belong to the same person with query face.
matchFace mode returns (a), (b), (c) and (d), exactly four candidates even if low similarity. For more information, see Face - Find Similar.
Given one set of unknown faces, face grouping API automatically divides them into several groups based on similarity. Each group is a disjointed proper subset of the original unknown face set, and contains similar faces. And all the faces in the same group can be considered to belong to the same person object. For more information, see Face - Group.
Face API can be used to identify people based on a detected face and a people database (defined as a LargePersonGroup/PersonGroup). Create this database in advance, which can be edited over time.
The following figure is an example of a LargePersonGroup/PersonGroup named "myfriends". Each group may contain up to 1,000,000/10,000 person objects. Meanwhile, each person object can have up to 248 faces registered.
After a LargePersonGroup/PersonGroup has been created and trained, identification can be performed against the group and a new detected face. If the face is identified as a person object in the group, the person object is returned.
For more information about person identification, see the following API guides:
Face Storage allows a Standard subscription to store additional persisted faces when using LargePersonGroup/PersonGroup Person objects (PersonGroup Person - Add Face/LargePersonGroup Person - Add Face) or LargeFaceLists/FaceLists (FaceList - Add Face/LargeFaceList - Add Face) for identification or similarity matching with the Face API. The stored images are charged at $0.5 per 1000 faces and this rate is prorated on a daily basis. Free tier subscriptions are free, but limited to 1,000 total persons.
Pricing for Face Storage is prorated daily. For example, if your account used 10,000 persisted faces each day for the first half of the month and none the second half, you would be billed only for the 10,000 faces for the days stored. Alternatively, if each day during the month you persist 1,000 faces for a few hours and then delete them each night, you would still be billed for 1,000 persisted faces each day.
Getting Started Tutorials
The following tutorials demonstrate the Face API basic functionalities and subscriptions processes:
- Getting Started with Face API in CSharp Tutorial
- Getting Started with Face API in Java for Android Tutorial
- Getting Started with Face API in Python Tutorial
Take a look at these sample applications that make use of Face API.
- Microsoft Face API: Windows Client Library & Sample
- WPF sample app that demonstrates several scenarios of Face detection, analysis and identification.
- FamilyNotes UWP app
- Universal Windows Platform (UWP) sample app that shows usage of speech, Cortana, ink, and camera through a family note sharing scenario.
- Video Frame Analysis Sample
- Universal Windows Platform (UWP) sample app that shows analyzing live video streams in near real time using the Face, Computer Vision, and Emotion APIs.