Skip to main content

During these rapidly changing times, one thing’s for sure: Artificial Intelligence is rising. Robots may not take over the world anytime soon, but they can definitely help us create smarter solutions for our customers. Today, we are going to start a journey in Cloud-based Artificial Intelligence.

Azure Cognitive Services

Why would you need AI in the cloud? Why would you need AI at all? Well, AI allows you to accomplish a lot of complex tasks. For example, your applications can use AI to understand speech, read text from images, make predictions, or even detect objects in videos. Such tasks are not purely algorithmic, and it’s a ton of work to do them from scratch. That’s why Microsoft developed the Azure Cognitive Services: a set of programming interfaces that allow you to interact with AI brains that run over the Azure cloud platform.

The process is straightforward. Let’s say you want to identify objects present in a picture (e.g., people, laptops, phones, furniture, you-name-it). All you need to do is feed the image to the remote service, and Azure shall provide you with a list of detected results, including their names and coordinates. Azure is doing the heavy lifting so that you can focus on the development of your application instead.

As you can see below, Azure Cognitive Services include a plethora of ready-to-use APIs to add AI capabilities to your projects. Most importantly, you can add AI functionality to your applications without any prior Machine Learning knowledge!

Computer Vision

Computer Vision allows you to get information from images and videos. Detect cars? Count the number of dogs in a picture? These are all Computer Vision tasks.

Face

That's the most intriguing application of AI. Using the Azure Cognitive services, you can detect faces and face landmarks. Plus, you can even create your own Face Recognition system to identify a person!

Speech

Have you ever used Cortana or Siri and wished you could integrate such kind of functionality into your application? Using Azure Cognitive Services, you can create an online speech recognition system to understand your voice commands.

Text

Another popular application of AI is the ability to comprehend text, detect sentiment, and even translate from one language to another.

Did you know?…

LightBuzz has been helping Fortune-500 companies, and innovative startups create real-world AI applications. To learn how Artificial Intelligence can help you grow your business, get in touch with us.

Computer Vision

In this article, we will create a simple Computer Vision service capable of detecting objects in images. In the next articles, I’ll show you how to use this service from desktop and mobile applications. The Azure Computer Vision APIs support the following operations:

Image

Using the Image Analysis API, we can extract a rich set of visual features based on the image content. The Image Description APIs allow us to generate a description of an image based on a collection of content tags.

Object Detection

Object Detection APIs perform object detection on an image. The Area Of Interest returns a bounding box around the most important area of the image. The Thumbnail API analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI.

Optical Character Recognition

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. The Read File operation employs OCR algorithms optimized for text-heavy documents and executes asynchronously.

Tags

Domain-Specific Content recognizes content within an image by applying the celebrities or landmarks models. The Image Tag operation generates a list of words or tags relevant to the content of the supplied image.

Throughout this article, I will explain step by step how to create a new Computer Vision API and acquire its credentials.

Creating a new Computer Vision API

First things first. To use all of the Azure goodies, you need a Microsoft Azure account. It’s free. After you log in to your account, you should see the Azure Portal homepage.

Azure Cognitive Services - Portal

Then, click the menu icon and select the Dashboard item. From there, go to the Marketplace.

Azure Cognitive Services - Dashboard

The Marketplace is a store that allows you to easily extend your cloud account with new features. Under AI + Machine Learning, select Computer Vision.

Azure Cognitive Services - Marketplace

Then, click Create.

Azure Cognitive Services - Computer Vision

This will navigate you to the Create Computer Vision page.

Azure Cognitive Services - Computer Vision - Create

There, you need to create a new resource group by clicking the Create new option, typing a name, and selecting the OK button. Also, select a region, type a name for your API, and select the appropriate pricing tier for your needs.

At the moment, there are two available pricing tiers:

  1. Free F0 (20 calls per minute, 5K calls per month)
  2. Standard S1 (10 calls per second)

During the development stage of your project, I would recommend selecting the free tier. You can easily change the pricing tier after you create your API.

After configuring all the options, click the Review + Create button. You will navigate to the corresponding tab and you will see the Validation Passed notification. Review your selected options and the Terms and then click the Create button.

Azure Cognitive Services - Computer Vision - Validation

The following notification informs you about the deployment progress.

When the deployment process is finished, you will get the option to Go to resource.

Azure Cognitive Services - Computer Vision - Overview

Congrats! You have successfully created a new Computer Vision API.

Keys and Endpoint

To add the Computer Vision API to your client project, you need your Computer Vision subscription key and endpoint to get authorization. To find them, open the resource you’ve just created and go to the Keys and Endpoint tab. All you need to do is copy the Key 1 and Endpoint values.

Azure Cognitive Services - Computer Vision - Keys

And there you have it! In our next tutorial, we are going to see how to use the key and endpoint information to call the Cognitive Services API from a client application. I’ll guide you step-by-step to the process of creating a real-time object detection app that will draw rectangles around the detected objects.

Enjoy your cloud adventures!

Before you go…

LightBuzz has been helping Fortune-500 companies, and innovative startups create real-world AI applications. To learn how Artificial Intelligence can help you grow your business, get in touch with us.

Sharing is caring!

If you liked this article, remember to share it on social media, so you can help other developers, too! Also, let me know your thoughts in the comments below. ‘Til the next time… keep coding!

Georgia Makoudi

Georgia Makoudi

Georgia is a Cloud Specialist at LightBuzz. During the past ten years, she's been developing secure backend systems for financial institutions and healthcare companies. She's passionately writing about Microsoft Azure. Did we mention that she loves Escape Rooms?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.