Exercise - Set up the Custom Vision service
In this module, you are going to use Azure AI Custom Vision, part of the Azure AI services suite, to detect your favorite animal in an image. Before we jump into training AI, we need to set up our work environment. In this case, your work environment will be all in the browser on Azure.
Sign up for Azure
To use Custom Vision, you will need an Azure account. But don't worry! This is a quick process, and there are free trials you can use to try it out. If you get stuck at any point, be sure to check out the Create an Azure account Learn module. This module also gives an overview of Azure pricing.
If you haven't used Azure before, you can sign up for a free trial. The free trial gives you free services, which includes Custom Vision. You also get a free credit to use some paid services in the first month.
If you are a student, you can sign up for a student free trial of Azure without having to put in a credit card. Similar to the regular free trial, this option gives you free services and a free credit to use in the first year.
Create your resource group
The best way to experiment with Azure is to create a resource group that will be easy to keep track of. Resource groups are ways of connecting services that you are using together. If you create a resource group for this module, when you are done you can delete the entire resource group and ensure you don't accidentally leave any AI running and get charged.
To get started creating a resource group, follow these steps:
- Go to the Azure portal.
- Sign in to Azure if you're not signed in already.
- In the top search bar, search for Resource Group.
- Select Add.
- Select your subscription, give the resource group a name, and choose the region closest to you.
- Select Review + create.
- Select Create.
You can go to your resource group now. If you ever lose your resource group, you can find it by entering Resource Group in the top search bar again and then selecting the resource group.
Create your Custom Vision resource
The only resource you will need for this module is a Custom Vision resource. Azure has made it easy to get everything you need to use Custom Vision AI. By creating this one resource, you will be able to upload images, train your image classification model, and test the model without having to write a single line of code. And don't worry, if you don't know what training and testing a model means, we will get into that in the next unit.
To create a Custom Vision resource, follow these steps:
- From your over-the-moon resource group, select Add.
- Search for Custom Vision.
- Select Create.
- Select your subscription, give your resource a name, select the region closest to you for both training and predicting, and select the free tier for both training and predicting.
- Select Review + create.
- Select Create.
When deployment is done, select Go to resource.
If you ever lose your Custom Vision resource, you can find it by entering Resource Group in the top search bar, selecting the resource group, and selecting the Custom Vision resource.
Create a project on the Custom Vision portal
Now that you have the Azure resources to run the AI, we can create a project on the Custom Vision portal. Go to Custom Vision, and sign in with your same Azure credentials. If this is your first time visiting, you might need to accept the Terms of Service.
To get started with your project, follow these steps:
- Select New Project.
- Give your project a name and description.
- Ensure the Custom Vision resource that you made earlier is selected.
- Select Object Detection for the Project Type.
- Select General for the Domain.
- Select Create project.
Review setup
Let's review everything we just did. While it only felt like a few clicks to us, we have a lot of powerful computers working for us right now.
Here's everything we have encountered.
The Azure portal
Azure is a cloud service that gives you the compute power to run code in a secure place not on your computer.
What we are doing for this module is a tiny portion of what Azure can do for you. If you are interested in learning more about what Azure can do for you, check out Azure on Microsoft Learn. There are a lot of modules on Azure AI services available.
Custom Vision resource
Custom Vision on Azure is even more powerful than the bit we are going to explore in this module. Open the resource in Azure.
You can see there are a number of resources in the menu on the left that start to hint at the complexity of the service that will be working for you as you train your AI. In this module, we will stay in the Custom Vision portal, which is like a front page to this resource.
Everything that you do in the Custom Vision portal will be using the compute resources that you provisioned here in the Custom Vision resource in Azure. Custom Vision also has an SDK. Like the portal, the calls to the SDK would be using what was provisioned on Azure as part of this resource.
If you get inspired by this module, we encourage you to check out the other Microsoft Learn modules on Custom Vision.
Custom Vision portal
The Custom Vision portal is a user interface that allows us to interact with the Custom Vision resource without having to write code. Everything we do here gets broken down into lines of code that you could do without this interface.
When we created the project in the Custom Vision portal, we were able to choose one of two classification types: Classification and Object Detection. The biggest difference is that Classification classifies an entire image. Object Detection identifies the location of a particular object from within images. For this project, we wanted Object Detection because we want to identify Bungee in images from the film.