Microsoft AI, microsoftai

Source: Internet
Author: User

Microsoft AI, microsoftai

Overview

Windows AI Platform was officially released on Windows Developer Day a few days ago. As a model definition and training of Windows AI Platform, it still needs to be implemented on the cloud. Azure is undoubtedly a good choice.

Azure, as Microsoft's cloud service in recent years, is also at the leading level in AI and Machine Learning. Currently, Azure's AI capabilities cover machine vision, semantic speech, language understanding, language translation, and cognitive services. Most of these APIs are encapsulated. Developers do not need to care about the collection of training datasets, but do not need to care about the training process and the data model after training. They only need to call the API, input your data to get the ideal output, which is very convenient, such as Azure Face API and Computer Vision API. However, if our dataset is not a common dataset, what if we want to use custom features to develop our own classification? This encapsulated API does not seem so suitable.

For this scenario, Microsoft launched the Custom Vision Service (Custom image Service), which is included in Cognitive Services (Cognitive Service) and is still in the PREVIEW stage. Although it is called Custom Vision, at present, it only provides image customization or image classification function. After official release, other fields of image definition should be expanded.

 

Service experience

Basic Concepts

Custom Vision-Visual Intelligence Made Easy

This is the Slogan of Custom Vision, making visual intelligence easy. Why is it custom? Let's look at a flowchart on the official website:

  • Upload Images-Upload an image and mark it
  • Train-Train a model using a Tagged Image
  • Evaluate-train the trained Model

Procedure

The management unit of Custom Vision is a Project. After logging on to the Microsoft account, click "New Project" to create a New Project:

Enter the Project Name and description, and select a domain to create a project. Here we will focus on the current domains: General, Food, Landmarks, Retail, Adault, General (compact), Landmarks (compact), and Retail (compact ). The three fields marked as compact can be exported for the trained model. As we can see, because the preview stage is still in progress, there are still few domains available. For developers, if they can identify a specific domain, they should select that domain. If they cannot be determined, select General.

After the project is successfully created, let's take a look at the project homepage:

  • Training Images-upload your Training image dataset, mark each image after uploading, and manage Images and tags in Workspace;
  • Performance-for the Performance of training data, you can view the Performance values of each category after training to adjust your Performance threshold;
  • Predictions-evaluates and predicts the classification accuracy of the tested Image Based on the trained model;
  • Train-after preparing the training image dataset, click the Train button to start the training task;
  • Quick Test-after the training is complete, you can use the Test image to perform a simple and Quick Test online;

Next, let's take a look at the use process based on actual application scenarios. We classify and recognize the hand-drawn drafts of five categories. Each of the 10 images is classified into airplane, alarmclock, ambulance, ant, and arm:

It should be noted that Custom Vision has requirements on the number of categories and the number of images for each category, at leastTwoCategory. Each category must be at leastFive sheetsImage;

In addition, because Custom Vision is still a preview version, there are limits on images and projects. Each project can only be uploaded.1000Images,50Categories,20Iteration. In addition, the total number of projects to be created is limited20Projects. The maximum number of predicted keys is daily.1000. If you use the Azure account to log on, the quantity limit will be canceled, corresponding to a billing policy, for Azure international users:

 

Now we start to train the model using the dataset of 50 images:

As we can see, because the size of the uploaded images is small and the data features are not very stable, the accuracy of each classification training is not stable, and the recall rate is the same.

After the data model training is complete, we first use the simplest method "Quick Test" to Test the classification accuracy:

First, use an image airplane in the classification to test. We can see that the probability of recognizing airplane is significantly higher than that of other categories.

Use a fish that is not in the category for testing. Because fish is not in our five categories, and the features in this hand-drawn draft are not similar to those in the classification, the recognition results are average, and relatively low. This result is within expectation.

API result Verification

In addition to the simple online Test method of "Quick Test", it also supports the API Prediction method, which is more suitable for batch automated testing. On the Prediction Tab, you can see the API address and Key information for this project:

 

To simplify the verification, we use Postman to set parameters and input images as instructed above:

We use a local file for testing. After setting Headers and binary bodies, we will get the following results:

The airplane file is actually the first image of Quick Test, so we can see that the detection results are the same, which also verifies the results of the two verification methods.

Model Export

As mentioned above, models with compact words can be exported. Currently, the Custom Vision platform supports two export methods:

  • IOS 11 (Core ML)-. mkmodel File Format
  • Android (Tensorflow)-. pb File Format

I can't help but think about it. Do you still remember the Windows AI Platform mentioned earlier? It supports the onnx model file format, which is not supported in Custom Vision, is this a family?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.