Part 0: Install and configure tools
As with any project, a few tools are going to be needed. In particular you’ll need a code editor, an Azure subscription, and a couple of keys for Custom Vision.
Installing the editor
Visual Studio Code is an open source code editor which can be used to create nearly any project type with any programming language. If you don’t already have Visual Studio Code installed, you can install it by visiting code.visualstudio.com. You will also need the Pylance extension, which will provide additional functionality when writing Python.
Obtaining the starter project
A starter project has been provided which includes the images for the workshop and the solution code. To obtain the project:
- Navigate to https://github.com/microsoft/workshop-library/
- Select Use this template to create a copy of the repository in your GitHub account
- Name the new repository workshop-library
- Select Create repository from template
- When the new repository opens, select Code
-
Select the Local tab and then the Copy button
-
Open a terminal or command window and execute the following, replacing <URL> with the URL you copied in the prior step
# Windows git clone <URL> cd workshop-library\full\ml-model-custom-vision code . # Linux, WSL or macOS git clone <URL> cd workshop-library\full\ml-model-custom-vision code .
Enrolling with Azure for Students
Azure for Students offers $100 US in free credit to be used across 12 months and a host of free services - including Custom Vision! If you don’t already have an Azure subscription, you can enroll with Azure for Students by using your school email address. If your email address doesn’t work, please ask your instructor for a code.
Creating keys
To use Custom Vision, you’ll need two keys:
- a training key, used to create the model
- a prediction key, used to make predictions based on the model
We’ll create these keys by using the Azure portal.
- Navigate to portal.azure.com
- Select Create a resource
- Search for Custom Vision and press enter
- Select Custom Vision from the list of services
- Select Create
- For Create Options ensure Both is selected
- Under Project Details configure the following:
- For Subscription select your Azure for Students subscription
- For Resource Group select Create new, enter custom-vision for the name, and select OK
- Under Instance Details configure the following:
- For Region select a region near you
- For Name, provide a unique name such as custom-vision-your-name, replacing your-name with your name
- For both Training pricing tier and Prediction pricing tier select Free F0
- Select Review + create
- Select Create
Summary
You now have all the necessary tools for creating and using a custom vision model. The next step is to train the model.