The Azure Guide/Compute Vision

In this section, we take a look at another interesting feature of Azure, Compute Vision.

Introduction

edit

It is a form of machine-learning, wherein we train the system with different images which are identified to different tags. Then this model can be further used in applications using the keys. Note that this is one service where there is no free substitute; there used to be a 'limited trial' option but such an option was recently discontinued. (Remember thought that Microsoft does have different promotions for Azure)

Also, the main portal (portal.azure.com) is not used; we use the computevision.ai website (which is still by Microsoft) instead.

Procedure

edit

As stated above, an Azure subscription is required. If you don't, you will be unable to continue.

  • Go to the website computevision.ai, and create a new project. Then assign the project to a resource group, creating a new one if required.
  • Give a name for your project, and select the type. The options on this section mainly depend on the type of project you are looking for: are you looking to identify images or objects within an image? Which categories of images will your project being based upon? Choose them carefully based on your needs.

 

  • Add your images. Note that each image must be up to 6 MB, cannot be videos (as they are hard to train), and you can only add 150 images to the whole model. This process can be repeated. [Note: Depending on how you obtain your images, you may have to do some image-cleaning to remove nonsensical images.]

The Bing Image CLI service can be used to quickly get stock images given a tag.

  • Click Train. Note that if there is only one tag, then you'll get an error saying that "Your project can't be trained just yet. Make sure you have at least 2 tags and 5 images for every tag." Compute Vision will now run some iteration tests. As we see below, our model is fairly reliable (though adding more is usually always better for reliability).

 

  • Using the Quick Test option will allow you to try an image of your choosing for the Compute Vision model to evaluate. This is a very good way of making sure that your model is reliable. Our test image returned the following result:
Tag Probability
beer 99.9%
wine 0%

Such a one-sided result is likely to mean that it is accurate (and it was in this case).

  • Once you are ready, publish your iteration. You'll be then able to get the URLs required to integrate into your application, which will usually be in this form:

 

See also

edit