Applications are changing. Back in the early days we had applications that basically only did “crude operations.” Today we are at the beginning of an era where applications can become much more intelligent then we would ever had expected them to be. Microsoft has a couple of solutions available in Azure that could make applications instantly much more intelligent and really easy to integrate in your application. In this blog post I will demonstrate the power of AI in Azure.
Azure Custom Vision
Custom Vision is a resource that is currently in preview. Custom Vision allows users to create a custom vision model, which can be used as image classifier. You can then feed the model with service images and apply tags to those images. For example: you can upload pictures of chairs, and assign a tag “chair” to each of the images that contains a chair. Once the images have been uploaded, the service can start learning. When the learning process has been completed, you can upload any kind of pictures to the service. It can then predict whether your image contains a chair or not.
The service can be integrated in applications quite easy. The Azure Service can be used via a REST API. With this API you can create tags, train the AI resource and do predictions. A reference to the REST API can be found here: https://southcentralus.dev.cognitive.microsoft.com/docs/services/f2d62aa3b93843d79e948fe87fa89554/operations/5a3044ee08fa5e06b890f11f
Getting started with Custom Vision
Getting started with Azure Custom Vision is quite easy. In this demo you will create a custom vision model that is able to classify if a dog breed is a beagle or not. Attached to this post I provide a ZIP file with pictures of dogs (15 pictures of a breed that is called “Beagle” and 15 pictures of other breeds).
- Go to: https://customvision.ai/and login with your Microsoft Account
- Create a new project with the following specs:
- Project Type: Classification
- Domains: General
- Once the project is created, it is time to create two tags. You can do this by clicking on the +button in the tags section.
- Now the tags are in place, it is time to upload pictures of dogs. First upload all the pictures of a “beagle” and assign the tag “Beagle.” You can do this by clicking on the “Add images” button. You first have to select the images (multiple images can be selected together). As the images are selected, you are able to assign the tag to them.
- After the pictures of a beagle have been uploaded, Add pictures of the other dogs, and assign the tag “NotABeagle” to them.
- The next step is to train the custom vision resource. You can do this by clicking on the “train” The training might take some time to complete.
- Once the training iteration has been completed, we can test the model that just has been created. You can do this by clicking on the “Quick Test” button. In the window that pops up, you can now upload other pictures. In the ZIP-file I have added three pictures that you can use to test:
- testimage-1.jpg – Beagle
- testimage-2.jpg – Beagle
- testimage-3.jpg – Not a beagle.
In the demo that is described before, we used the free “trail” SKU. At the moment of writing, there are two SKUs available with the following limitations:
- Amount projects: 2
- Maximum training iterations: 5
- 5000 training images per project
- Maximum 10 transactions per minute
- Amount projects: 100
- Maximum training iterations: unlimited
- 5000 training images per project
- Unlimited transactions per second.
Custom Vision is a really powerful Azure Resource that you can easily embed in your applications. Embedding Custom Vision in your application can instantly make an application much more intelligent. To inspire you, I will share some of the possible scenarios where I think that this resource can come in very helpful:
- An application where you can make photos of product, and the app will return the lowest price of the product to you. Custom Vision can help you to determine the product that has been photographed. The lowest price can be queried on the Internet.
- An application where you can make photos of a dog. Based on the picture a dog groomer can automatically send an offer for grooming that specific dog. Since the breed is now known, the time it takes to groom the dog can also be determined.
Also keep in mind that we are currently at the start of an era of artificial intelligence. Solutions will get much smarter very soon. This is just the beginning 🙂