DEV Community

Cover image for Using Azure Cognitive Services Vision Studio to Analyze World Cup images
Pablito Piova
Pablito Piova

Posted on

Using Azure Cognitive Services Vision Studio to Analyze World Cup images

In participation and collaboration with Luis Beltrán’s Azure Advent Calendar 2022, today I will be explaining step by step how to test Azure Computer Vision Cognitive services using Vision Studio.

Azure Computer Vision is a cloud-based artificial intelligence (AI) service that enables developers to add image and facial recognition capabilities to their applications. It is part of the Azure Cognitive Services suite of APIs, which provide developers with a range of AI capabilities that they can easily integrate into their applications.

Azure Computer Vision includes a range of features, such as:

  • Image analysis: This allows developers to extract information from images, including objects, people, and text.

  • OCR: This enables developers to extract text from images and documents.

  • Facial recognition: This allows developers to identify and analyze facial features in images, including age, gender, and emotions.

  • Object detection: This enables developers to identify and classify objects within images.

Azure Computer Vision can be used in a variety of applications, such as image tagging, content moderation, and security. It is easy to use and requires no prior knowledge of machine learning or data science.

To use Azure Computer Vision, developers simply need to sign up for an Azure account and then call the API using the programming language of their choice. They can then use the API to analyze and extract information from images and documents, or to recognize and analyze facial features in images.

For more information about Azure Cognitive Services Computer Vision, please check this Link


Previously you could run demos of the various Computer Vision Cognitive Services APIs, before they were freely available on the documentations site and Microsoft has removed it.
Now to run demos and test these services we must enter the Vision Studio.

Vision Studio is a set of UI-based tools that lets you explore, build, and integrate features from Azure Computer Vision, and provides you with a platform to try several service features and sample their returned data in a quick, straightforward manner. Using Studio, you can start experimenting with the services and learning what they offer without needing to write any code.

Follow these steps to get started:

1- Go to the Vision Studio site, the URL is
easy to remember, it is portal.vision.cognitive.azure.com or use this Link

Vision Studio Portal

Once you sign in using your Azure Account, you're going to be welcomed to this new Vision Studio if you don't have one already. You can create one for free in this Link
You will be able to have various vision APIs including OCR, Spatial Analysis, Facial recognition, and image analysis.

2- Choose any of the available resources, in my case "Extract common tags from images"

Image Tags from images
You're going to have to heed the warning here that it says that to run this demo, this resource must belong to these US East regions.

3- Please select a resource, then select an existing resource within your subscription.

Select Resource
If you'd like to create a new one, select Create a new resource. Then enter information for your new resource, such as a name, location, and resource group.
Create Resource
4- Check I acknowledge that this demo will incur usage to resource (in my case "ComputerVisionPiovaAI") in my Azure account.

Check
5- You can start testing the services. In this case use "Extract common tags from images".
In this section you can use the images that the portal provides us or else try our own images to analyze the service

Vision Studio
In my case I am going to use an image of Lionel Messi.

Vision Studio Messi
In the box on the right, it shows the attributes that the service detected with the percentage of confidence.
In the JSON tab it shows the structure of the response to use in the applications

Messi Json

Now I am going to try another service that is "Add captions to images".
I use my image (remember that you can use the ones established in the portal) and these are the results

Messi captions

To finish let's try "Extract text from images".

Flag
In my image there is a flag with a phrase that says "Cumple sus sueños quien resiste" in English: "Fulfill your dreams who resists"
The service has detected the phrase, the name Messi on his shirt and the C on his bracelet. Each word is detected, and you can click on it.

OCR JSON

It's pretty cool to play with you can look behind the scenes and see exactly what kind of data is being returned including the x and y coordinates for those boxes and the percentage confidence for what the word or item is according to the service used.
Very cool to play around with it without having to write all that programming code and you should generally check out Vision Studio
if you want to play with some of these APIs and see exactly what data Azure Cognitive Services are able to withdraw from these images.

Thanks for reading!

Top comments (0)