Configure and Query Cognitive Services Face API

Learn On Demand
Learn On Demand Pro Series

This virtual IT Pro Challenge lab shows learners how to make complex applications using managed AI services.. The AI application will use the Azure Cognitive Services Face API. Utilizing this API makes it possible for any user to use AI capabilities to analyze images of faces.

1 hour
Join over 3 million cybersecurity professionals advancing their career
Sign up with

Already have an account? Sign In »


Lab Overview:

This lab puts the learner in the role of an AI consultant for a data and analytics vendor. It is your job to set up and demonstrate the Azure Cognitive Services Face API service. You will learn important concepts about setting up the resource, understanding a rest api and running AI computer face searches. The final results will do everything from recognize that a face is in the picture to determining the probably emotional state.

Create a Cognitive Services Face API service:

Azure allows you to do much more than create common networking devices. There are managed services that provide access to technology that will really enhance the capability of an app. One such service is the Face API. The purpose of this service is to allow developers to recognize faces in an image and analyze attributes of the face. The service will be available using a Rest API at the given endpoint and use a key for authentication.

Test the Face API service for face detection:

A Rest API allows users to send HTTP requests that initiate an action. Most requests sent to a Rest API will have the url of the service followed by a json body that includes the users commands. Several programming languages can interact with the Rest API making it easy to embedded within an application. Azure allows you to test the API using a web interface. Notice that the options are changing the HTTP request including the json body that points to the image being used.

Test the Face API service for emotion detection:

One of the most impressive uses of the Face API is not only recognizing a face, but also attributes of the face. In this case it can even give you an idea of what emotion the face is displaying. Notice that different probabilities of emotions are given as to how certain the AI is. Once again the options are put into the HTTP request along with the json body that points to the image to be used.

Lab Summary Conclusion:

Azure expands the level of technology available to app developers. A very important tool for this purpose is the Cognitive Services Face API. This Rest API allows any app to send HTTP requests that can set what attributes of the face are desired by the app developer. This shows the importance of cloud resources in expanding the use of AI technology by a wider audience.