top of page
Search
Writer's pictureRakesh Budarapu

How to create Microsoft Azure Face Recognition Service?


In this tutorial, I’ll walk you, step by step, through the process of creating and configuration of a new Microsoft Azure Face Recognition Service. It is very easy — just follow the steps below.


To create a Microsoft Azure Face Recognition Service, you need a Microsoft Azure Account. To create one for your self, read our blog



And since Microsoft offers a FREE Azure Account with $200 credit for 30 days, you’ll have plenty of time to experiment with your server without worrying about being billed for usage.


Before we proceed, let us try to understand the fundamentals of Microsoft Azure Face Recognition Service.


The Azure Face service provides Artificial Intelligence algorithms that identify, detect, recognize, and analyze human faces in images provided to the system to analyze. Facial Recognition Software plays a very crucial role in many different scenarios, natural user interfaces, such as security, image content analysis and management, mobile apps, and robotics.


The Azure Face service from Microsoft Cognitive services provides several different facial analysis functions as listed below.


Face detection: The Face API service detects a person's face in an image and returns the rectangle coordinates of their locations around the face.

Face verification: The Face verification API does a verification against two detected faces or from one detected face to one person object.


Find similar faces: The Find Similar Face API Service does face matching between the primary face and secondary face, finding a smaller set of faces that look similar to the target face.


Face grouping: The Group Face API Service divides a set of unknown faces into several groups based on similarity


Person Personal identification (PPI): The Identify Face Service API is used to identify a detected face against a database of people (facial recognition search). For example, we employee face can be tagged to data, and access can be granted to the person based on policy defined by the organization.


Before we proceed, some sections of images are marked to hide the credentials. This should not impact your process. Let's jump into the process.


Step 1:


Log in to the Microsoft Azure portal, provide your account details.



Step 2:


Create a new resource


Step3:


Search for the keyword "face".


Step 4:


Select the option as shown below


Step 5:


Provide the details as shown in the example below, once entered click on "Review and Create".


Step 6:


Verify your information, if satisfied click on "Create".


Step 7:


Azure will verify your information and if the deployment is completed successfully, it will provide the message as shown below.


Step 8:


Go to your resource.


Step 9:


Go to "Key and Endpoint" and copy the key and endpoint (URL).


Now your "Microsoft Azure Face Recognition Service" is ready and available for use. To test your FACE API, we recommend testing the information on API testing tools. We use POSTMAN. You can use any application of your preference.


Step 10:


Open the POSTMAN application and create a new TAB as shown below.


Step 11:


Select the Method as "POST" and copy your URL from face API Service with the following details:



returnFaceAttributes=age,gender,emotion will add params to your request for "Age", "Gender" and "Emotions"


Step 12:


As the service depends on the key, the authorization section can be left blank as shown below


Step 13:


Add the key to the header as shown below


Ocp-Apim-Subscription-Key : {from face api service}

Content-Type : application/octet-stream



Step 14:


Under the section "Body", select the option as "Binary"


Step 15:


Select the sample image from your local computer as shown below





Step 16:


Verify the detail and click on "SEND"



Step 17:


If the "Microsoft Azure Face Recognition Service" and "POSTMAN" are configured correctly you will receive the success response as shown below.


Sample JSON Response will be as shown


[     { "faceId": "22873837-0b40-4d9e-b5ff-02dad6103d2d", "faceRectangle": { "top": 42, "left": 98, "width": 93, "height": 93         }, "faceAttributes": { "gender": "male", "age": 43.0, "emotion": { "anger": 0.0, "contempt": 0.0, "disgust": 0.0, "fear": 0.0, "happiness": 0.194, "neutral": 0.805, "sadness": 0.0, "surprise": 0.0             }         }     } ]


Step 18:


Using tools like POSTMAN, have an added advantage you will get the code for the various platform as shown below. Just click on "Codes" as shown below.



For example for "cURL"



For example for "HTTP"



For example for "Java - OkHttp"



For example for "Python"



For example for "PHP - HTTP_Request2"



For example for "Nodejs - Native"



Kindly leave us your feedback in the comments section. Also, check our other blog links are shared here,


How to Create up a New Microsoft Azure Account?



What is Application Integration?



How to Explain Artificial Intelligence and Machine Learning to Kids?


Recent Posts

See All

Comments


bottom of page