Using Azure Cognitive Services Vision Studio to Analyze World Cup images
Tags: azure, microsoftcloud, ai, machinelearning
Published: 2022-12-22 13:04:07

In participation and collaboration with Luis Beltrán’s [Azure Advent Calendar 2022](https://dev.to/icebeam7/azure-advent-calendar-o60), 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](bit.ly/azurecognitiveservices)

---
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](https://portal.vision.cognitive.azure.com/
)

![Vision Studio Portal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pzk6jh617px06u3l8lel.png)

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](https://azure.microsoft.com/en-us/free/ai/)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1x1n1sdikh5ovobfq561.png)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2oxznr52jqnptscuo6wt.png)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysm4puxf1agt67txvn6c.png)
4- Check I acknowledge that this demo will incur usage to resource (in my case "ComputerVisionPiovaAI") in my Azure account.

![Check](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vvzmfx2ptq98869rfaq.png)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hah1669mlt5cbytp62n.png)
In my case I am going to use an image of Lionel Messi. 

![Vision Studio Messi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5vym2su1ya3wdhbuthpl.png)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ncxjmmvfz4albeurup3v.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/unzkn0ht568vfwiy2pg4.png)

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

![Flag](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iq4j3ytj6s4jx4wy1ct3.png)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3o84qypj2h2az2clha1x.png)

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!