Learn how to train and test your model with the Custom Vision training API and SDK

Many of you might already have trained their first model with Microsoft’s Custom Vision. But did you know that you can easily add new images and retrain your model with the Custom Vision training API and that you can also test it with a little help of the SDK?

As part of the AI-102 preparation, I want to share my experiences with you and this time I want to focus on the classification of images with Microsoft’s Custom Vision. One of the recommended courses to prepare for this exam is the Classify Images course, including a nice lab to get hand-on practice. It is available (for free) on Microsoft Learn, so I am not going to repeat all the steps here, but I do want to share my key takeaways at the end.

There are a few options to do this lab:

  • Fully guided, including some context and explanation: follow the Classify Images course on Microsoft Learn. You would only need a browser and an Azure subscription. If you don’t have an Azure subscription, you can get a free trial.
  • “Do it yourself”: clone the corresponding GitHub repo for AI-102 AI Engineer and go to the folder named “Instructions”. In this folder you can find the Classify Images with Custom Vision (17-image-classification.md) lab. For this scenario you would also need an Azure subscription and i.e. Visual Studio Code installed on your laptop.

Personally, I like to have code on my own laptop (but yes, I also love the cloud).

My key takeaways for the exam preparation:

  • The Custom Vision service enables you to build your own computer vision models for image classification or object detection. Make sure you know the difference between these two options;
  • Know how to provision the Azure resources that are required, both for training and prediction purposes;
  • Make sure you can list the steps to train, publish and test a Custom Vision model;
  • The devil is in the details: when creating a model, make sure you understand which model you chose, the difference between multiclass classification and multilabel classification, why a specific domain, etc. You would have to click on the “i” and “read more” links;
  • Regarding the lab exercise it is important to really read through the provided code samples. You will need this in your exam, as they might ask you questions about syntax.

Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *

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