Learn the power of Cognitive Services in Azure and develop a Logic App that can detect faces using the Face API. This powerful combination allows us to gain valuable insights about faces, images, and emotions.

Introduction to Azure Cognitive Services:

Azure AI services help developers and organizations rapidly create intelligent, cutting-edge, market-ready, and responsible applications with out-of-the-box and pre-built and customizable APIs and models. Example applications include natural language processing for conversations, search, monitoring, translation, speech, vision, and decision-making.

Note:

This blog aims to provide references to various articles and services that were available in 2018. However, it is crucial to acknowledge that due to the passage of time, many of these services may no longer be actively supported by Microsoft. For instance, Cognitive Service has been renamed to Azure AI services, while Face API is now referred to as Azure AI Face service.

Despite these changes, this blog will still offer you an informative overview of the use case for Face API

Ref: https://learn.microsoft.com/en-us/azure/ai-services/what-are-ai-services

Use Case:

  • A security CCTV camera captures the faces of the shoppers who come into the store. Once the pictures are taken, they are uploaded onto OneDrive.
  • A Logic App consumes these images from OneDrive that will further be uploaded onto a Blob Storage.
  • Logic App retrieves the URI that can be passed to the Cognitive Services Face API (by providing a public URI/URL that the Face API can pull from).
  • The Face API will return a series of attributes that we will be sending email, or you can store them on SQL Azure.

What are Cognitive Services?

https://docs.microsoft.com/en-us/azure/cognitive-services/welcome

Microsoft Cognitive Services (formerly Project Oxford) are a set of APIs, SDKs, and services available to developers to make their applications more intelligent, engaging, and discoverable.

Microsoft Cognitive Services expands on Microsoft’s evolving portfolio of machine learning APIs and enables developers to easily add intelligent features – such as emotion and video detection; facial, speech, and vision recognition; and speech and language understanding – into their applications.

What is Cognitive Services Vision API?

The Vision API is a state-of-the-art image processing algorithm that helps to moderate content automatically and build personalized apps by returning insights about faces, images, and emotions.

This API has several operations like

  • Face Detection
  • Face Verification
  • Similar Face Search
  • Face Grouping
  • Face Identification.

What is Face API?

  • Detect human faces and compare similar ones.
  • Organize images into groups based on similarity.
  • Identify previously tagged people in images.

https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/overview-identity

Register & get Face API Key to use in your app:

https://azure.microsoft.com/en-in/try/cognitive-services/?api=face-api

Steps: Prerequisites:

A.   Create Cognitive Service:

Select Category -> AI+ Machine Learning

Pricing: Select Free

B.   One Drive:

Configure one drive.

C.   Create Blob Storage

Create blobstorage.

And images as a container

Logic App – Steps:

Logic Apps Flow:

1.     Create/Configure one Drive:

Search OneDrive & Select – When a File is Created Trigger

Sign in:

Select the Folder you configured for OneDrive:

Select the Interval:

2.     Create a blob Connector.

Now, Search Blob and Select -> Create Blob

Enter the Blob URL & then the Folder path will appear.

Enter Below details:

3.     Face API – Detect Faces

Search -> Face API -> Select Detect Faces

Configure Face API:

Connection:

Enter any Name.

API key:

Register for the API & get the Key from the below URL:

https://azure.microsoft.com/en-in/try/cognitive-services/

Select face API-> click on -> Get API Key

Endpoint:  Copy Your Endpoint& enter in face API connector:

https://westcentralus.api.cognitive.microsoft.com/face/v1.0

Now, Enter the Blob image URL& drop the Path after the URL.

4.     Send Email

Add Action: For each Loop & add Gmail:

5. Run Logic App Now:

  • Run Logic App
  • Drop Images on One Drive:
  • Check email for the data:

That’s it!

Conclusion:

In a matter of minutes, we were able to harness the power of Cognitive Services in Azure and develop a Logic App that can detect faces using the Face API. This powerful combination allows us to gain valuable insights about faces, images, and emotions.

It’s important to note that the example provided here utilizes a previous version of Azure AI services.

However, in an upcoming article, we will be showcasing the latest service offerings available. Stay tuned for the latest advancements in Azure AI!

Leave a Reply

Discover more from Rajeev Singh | Coder, Blogger, YouTuber

Subscribe now to keep reading and get access to the full archive.

Continue reading