This article is a hands-on tutorial to create a face detection and recognition system using Azure Cognitive Services. Face Detection and Recognition are non-trivial computer vision problems and are solved with a machine learning approach. There are multitudes of libraries that offer the solution for these problems. Howsoever, with Azure Cognitive Services, it becomes a lot easier.
Face Detection
Face detection as the name suggests in a technology using which human faces can be detected in images, videos, and other digital forms. This has huge implications for systems from airports to shopping malls. Its applications and usage are only limited to human imagination.
Face Recognition
Face Recognition is the capability of a system to recognize and distinguish a specific person through matching the digital image or video from the database of faces. From usage for security to unlock phones to identify people in social media platforms like Facebook, face recognition has huge implications.
Azure Cognitive Services
Azure Cognitive Services enables organizations to build cognitive intelligence for applications with client library SDKs and REST APIs. Azure Cognitive Services allows developers to integrate cognitive features into applications with no prior knowledge of Machine Learning, Data Science, and Artificial Intelligence skillset. From Computer Vision to Natural Language Processing and Conversational AI, Azure Cognitive Services enables all kinds of applications.
Python
Python is one of the easiest and widely used programming languages across the globe,
- Taught as a beginning programming language to students
- Clear syntax facilitates, ease of understanding and code indentation
- Active communities of libraries and modules developers
Anaconda
Anaconda is a distribution for scientific computing which is an easy-to-install free package manager and environment manager and has a collection of over 720 open-source packages offering free community support for R and Python programming languages. It supports Windows, Linux, and Mac OS and also ships with Jupyter Notebook.
Jupyter Notebook
Jupyter Notebook is an amalgamation of an IDE and also an educational tool for presentation which is used extensively and widely mostly for programming for scientific computing.
Today, we’ll learn to develop a face detection and recognition system using Azure Cognitive Services. The tutorial is programmed using Python in Jupyter Notebook with Anaconda Environment. To check out the codes and dependencies for your setup, kindly visit Github.
Create a Cognitive Service in Azure
Step 1
This would be important for the features in Azure Cognitive Service such as Face Service will use AI algorithms to process the data we supply and perform the calculations as we require.
To Create the Cognitive Service, check out the previous article How to Create a Cognitive Service in Azure?
Step 2
Obtain Key 1 and Endpoint from the running Azure Cognitive Service to replace in the following code for cog_key and cog_endpoint respectively.
Step 3
Step 4 - Face Detection
Since the Cognitive Services is now running, Face Service is provided by the Azure Cognitive Service for our usage.
Step 5
Every face that is detected is assigned a unique ID by the system. We can check the Unique IDs for different faces detected in the image as follows,
Step 6 - Emotion Evaluator
Multitudes of facial attributes can be analyzed with the features provided by Cognitive Service. Various emotional states from the facial features and expressions can be analyzed.
Step 7 - Face Recognition
Similar to the functionalities provided in Facebook and Google Photos, where one person once recognized, other images with the same person are automatically detected. This can be done by allocating a unique id to one person’s face and when another image has face with similar features, the unique id helps detect new face and compare to the previously detected faces, thus finding the match.
Here, obtaining the unique id for the first image and comparing the facial features of all the people from the second image, the system has efficiently recognized the same individual.
Thus, in this article, we learned about face detection and face recognition, and using azure cognitive services a hands-on tutorial for the face detection and face recognition system was developed. We learned how to use the keys and endpoints from Azure in our system in jupyter notebook. Face detection from image, unique Id allocation for each different detected face, analyzing the emotion of the individual and even face recognition using similar features from different images were shown. This tutorial shows how powerful Azure Cognitive Services is and recognizing its role to enable developers, engineer and organizations to build, develop and deploy AI capable system is paramount. From novice developers without any knowledge of domains of Artificial Intelligence to seasoned engineers, anyone can benefit from the services Azure provides.
Comments
Post a Comment