Creating An Emotion API On The Azure Portal

This article shows how to create the Emotion API on the Azure Portal and access the keys to use the Emotion API in our applications.

 Microsoft Cognitive Services enable the developers to create robust AI algorithms in their applications. Cognitive APIs include vision, emotion, face, video, speech recognition, and more.
 
Overview of an Emotion API
 
Emotion API allows the applications to recognize the feelings showed by one or more people in a picture, then it returns a square box on the people's face. The Emotion API detects happiness, sadness, surprise, anger, fear, contempt, and neutral expressions on a face. When the API detects the emotions in the picture, then it returns an array of face entries & their feeling scores, ranked by faces with the rectangle in descending order. The Empty response ensures that there are no faces detected. This API takes a facial expression in a picture as an input and returns the confidence across a group of emotions for each look in the image.
 
The working conditions for Emotion API in our applications are,
 
The supported input picture formats consist of JPEG, PNG, GIF(Initial frame only), BMP. The image size must be no longer than 4MB. The trackable face size range is 36x36 to 4096x4096 pixels. Out of range pictures are not detected. For each picture, the maximum number of faces detected is 64, and the faces rankings are shown in descending order.
 
Follow the steps to create an Emotion API based application.
 
Step-1
 
Sign-in to the Azure Portal.
 
Step-2
 
Press "+New" and in the search bar, type "Emotion API" and then choose the Emotion API(Preview).

 

Step-3
 
In the "Terms and Conditions" blade, read the online service terms and press "Create" to proceed with the creation of an Emotion API.

 
Step-4
 
In the "Create" blade, enter the name for your Emotion API and choose the subscription and location. For pricing tier, choose the desired one for your API and press "Select."

 

Step-5
 
Then, create a new resource group for your API and choose the conditions because it is used to improve the performance of our Emotion API. Then, press "Create."

 
 
Step-6
 
After successful deployment of our API, it opens the properties of an Emotion API and asks to grab the keys for accessing Emotion API through various applications.

 

Step-7
 
In the "Manage Keys" blade, copy and paste the keys in the clipboard to access the API through various applications. 

 
 
Summary
 
I hope you understood the concept of Emotion API and the creation of Emotion API on the Azure Portal.