Artificial intelligence (AI) is an area of computer science that emphasizes the creation of intelligent machines that work and react like humans. And AI (and machine learning) is all the rage these days. However, unless you have a PhD in Mathematics and Computer Science, AI programming remains an elusive field to many developers. But this shouldn’t be the case. What most developers want is the ability to integrate AI capabilities into their applications without knowing the nuts and bolts of how AI works.

Find additional: Artifical Intelligence Articles

The Microsoft Cognitive Services is a suite of AI services and APIs to help developers integrate AI capabilities into their applications without building the AI services from scratch. Developers simply need to choose the relevant APIs from the Cognitive Services for their needs and requirements.

The various services in the Microsoft Cognitive Services allows you to:

  • Analyze images and provide a description of their content
  • Perform language translations
  • Use machine vision to recognize users and emotions
  • Perform image recognition
  • And much more

In this article, I’ll walk you through some of the capabilities of the Microsoft Cognitive Services. You’ll learn how to use the various APIs and services and integrate them into your Python, iOS, and Android applications. You’ll also learn how to build a custom learning model to recognize the thorny (and to some people, smelly) fruit known as durians!

Getting Started

To get started with the Microsoft Cognitive Services, use a Web browser and go to https://azure.microsoft.com/en-us/services/cognitive-services/. Click the Start Free button. You’ll now be able to select the Cognitive Services that you want to use (see Figure 1).

Figure 1: Getting the API key for the services you want

Click on the first GET API Key button. This allows you to get the Computer Vision API key. You should see the options shown in Figure 2.

Figure 2: Selecting the types of account you want to use

For readers without an Azure account, click the Get started button under the Guest section. In the next screen, accept the terms and conditions and click Next. You need to select one of the ways to log in (see Figure 3).

Figure 3: You can log in using a variety of different accounts

Once you’ve successfully logged in, you’ll be able to get your trial API keys for the Computer Vision API (see Figure 4).

Figure 4: The API keys and endpoint for the Computer Vision API

It’s important that you take note of the following for each API:

The endpoint of each service uniquely identifies the types of service you are using, such as Face API, Vision API, etc.

You can repeat the process to apply for the trial API keys for other services, such as Face API, etc.

Testing the APIs Using CURL

The best way to test out the various services provided by the Microsoft Cognitive Services is to use the cURL utility.

For macOS users, cURL is already installed right out of the box. For Windows users, you can obtain and install cURL from https://curl.haxx.se/download.html.

Using the Vision API

Let’s get started with the Vision API, which is a lot of fun to test out. The Vision API includes the following services:

  • Analyze: The Analyze service helps to detect and provide insight about the visual features and characteristics of your images.
  • Describe: The Describe service analyzes the content in an image and the description summarizes what is found in the image.
  • Generate Thumbnail: The Generate Thumbnail service generates a high-quality thumbnail and then analyzes the objects within the image to identify the region of interest (ROI).
  • Tag: The Tag service returns tags based on more than 2000 recognizable objects, living beings, scenery, and actions.

Let’s see how each of these services work with examples.

Analyze Service

The Analyze service helps to detect and provide insight about the visual features and characteristics of your images. For this feature, I’m going to use the image (see Figure 5) located at https://bit.ly/2CI9I53.

Figure 5 : A picture of Steve Jobs speaking

In Terminal, type the following command (all in a single-line; formatted here to aid readability):

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2CI9I53"}'
'https://westcentralus.api.cognitive.microsoft.com/
vision/v1.0/analyze?visualFeatures=Categories,
Tags,Description,Faces,ImageType,Color,Adult&
details=Celebrities,Landmarks&language=en'

In the preceding command:

  • Replace the <Subscription_Key> with your own subscription key.
  • Specify the image you want to analyze using a JSON string containing the URL of the image and submit it through the –d option.
  • The Base URL of the service is that of your endpoint, plus the service you are assessing: https://westcentralus.api.cognitive.microsoft.com/vision/v1.0/analyze. The options for the service are then passed through key-value pairs after the base URL. Here, vision indicates the Computer Vision API, and analyze is the service within the Vision API.
  • You want the result to contain the following information: Categories, Tags, Description, Faces, ImageType, Color, and Adult, and you pass in all these options through key-value pairs in the URL. The details of the image contain Celebrities and Landmarks.
  • You want the result to be returned in in English (language=en).

The result returned from the service looks like Listing 1 (formatted for readability).

Observe that:

  • The categories key contains the main result of the image
  • It can identify the person in the image (Steve Jobs) with a confidence level of 99.99%.
  • It can detect the subject’s age (48; via the Age attribute).
  • It can locate the position of the face (faceRectangle attribute).
  • It also identified a number of other features in the image—man, person, necktie, concert, etc.
  • It returned a caption that says, "Steve Jobs was wearing a suit and tie talking on the cell phone".

Not all of the results were accurate, but it’s quite impressive that the service got a number of things correct.

If you want the result to be returned in other languages, such as Chinese, replace the value of the language key with the language code, such as "zh":

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2CI9I53"}'
'https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/
analyze?visualFeatures=Categories,
Tags,Description,Faces,ImageType,Color,Adult&
details=Celebrities,Landmarks&language=zh'

I’ll let you try this out and see the result for yourself.

Sometimes, the image you want to analyze is not on the Web, but local, on your computer. In this case, how do you pass the image to the Vision API? You can use the following command (portions of it bolded for emphasis):

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/octet-stream'
--data-binary @stevejobs.jpg
'https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/
analyze?visualFeatures=Categories,
Tags,Description,Faces,ImageType,Color,Adult&
details=Celebrities,Landmarks&language=en'

In this case, you’re uploading the binary image (named stevejobs.jpg and saved in the current directory) instead of specifying the URL for the image. Specifically, note the --data-binary option and the value of the Content-Type in the header.

The Analyze service of the Vision API not only recognizes people; it also recognizes landmarks. Let’s try it using the image (see Figure 6) located at https://bit.ly/2Q8qy4n.

Figure 6 : A picture of Notre Dame de Paris

Instead of viewing the entire JSON result, you can extract only the result of interest to you using the jq processor.

The following command sends the image to the Vision API’s Analyze service, obtains the result, and extracts the value of the categories key:

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2Q8qy4n"}'
'https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/
analyze?visualFeatures=Categories,
Tags,Description,Faces,ImageType,Color,Adult&
details=Celebrities,Landmarks&language=en' |
jq '.categories'

The result is as follows:

[
  {
    "name": "building_",
    "score": 0.6171875,
    "detail": {
      "landmarks": [
        {
          "name": "Notre Dame de Paris",
          "confidence": 0.966315507888794
        }
      ]
    }
  },
  {
    "name": "outdoor_",
    "score": 0.0078125,
    "detail": {
      "landmarks": [
        {
          "name": "Notre Dame de Paris",
          "confidence": 0.966315507888794
        }
      ]
    }
  }
]

The result shows that the service has recognized the image as that of "Notre Dame de Paris".

Describe Service

The next service in the Vision API is the Describe service. The Describe service analyzes the content in an image and the returning description summarizes what is found in the image. Each description is evaluated and a confidence score is generated. A list is then returned, ordered from highest confidence score to lowest.

For this example, you will make use of the image (see Figure 7) located at https://bit.ly/2ELp9MD.

Figure 7 : An image of Bill Gates and his daughter

To get a description for this image, type the following command in Terminal:

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://read.bi/2ELp9MD"}'
'https://westcentralus.api.
cognitive.microsoft.com/
vision/v1.0/describe'

You should get the following result:

{
  "description": {
    "tags": ["person", "indoor", "man", "photo",
             "posing", "standing", "couple",
             "people", "sitting", "table",
             "front", "holding", "group",
             "woman", "food", "cake", "large",
             "suit", "white", "shirt",
             "kitchen"],
    "captions": [{
      "text": "Bill Gates et al. posing
               for the camera",
      "confidence": 0.98106487648114582
    }]
  },
  "requestId":
    "1a8d818b-41fd-4d5f-8ddc-e3bbd883c5c6",
  "metadata": {
    "width": 480,
    "height": 360,
    "format": "Jpeg"
  }
}

Interestingly, the service could recognize Bill Gates but not his daughter. Also, the tags key contains irrelevant items like "cake" and "kitchen," which aren’t found in the image.

Generate Thumbnail Service

The next service of the Vision API is the Generate Thumbnail service. The Generate Thumbnail service generates a high-quality thumbnail and then analyzes the objects within the image to identify the region of interest (ROI). It can optionally crop the image to fit the requirements of the ROI.

For this section, you’ll make use of the following image (see Figure 8) located at https://bit.ly/2AxcAjR.

Figure 8 : A image of Bill Gates (off-center)

To use the Generate Thumbnail service, you pass in the URL of the image and use the --output option to specify a filename to save the thumbnail returned by the API:

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2AxcAjR"}'
'https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/
generateThumbnail?width=303&height=303'
--output billgates.jpg

Figure 9 shows the result of the output, saved in the file named billgates.jpg, and located in the current directory.

Figure 9 : The extracted thumbnail of the image

Here are some sample images for you to try:

Tag Service

The Tag service returns tags based on more than 2000 recognizable objects, living beings, scenery, and actions. For this feature, you’re going to use the image (Figure 10) located at https://bit.ly/2Obj9vW.

Figure 10 : An image containing a train

Type the following command in Terminal:

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2Obj9vW"}'
'https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/tag'

The result is as shown in Listing 2.

The result contains a series of tags describing the image.

OCR

One very interesting service in the Vision API is the OCR service. The OCR service in the Vision API allows you to detect printed text in images, as well as handwritten text.

Let’s first try to detect printed text in the image shown in Figure 11.

Figure 11 : An image with some printed text

Type the following command in Terminal:

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2SD9u4u"}'
'https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/ocr?
language=en&detectOrientation=true'

You should get the result shown in Listing 3.

You can also use the OCR service to recognize handwritten text. However, unlike the ocr method in the URL (https://westcentralus.api.cognitive.microsoft.com/vision/v1.0/ocr?...), you now need to use the recognizeText method. Also, this method runs asynchronously, and it doesn’t return the result directly. Instead, it returns an URI in the response header field: Operation-Content. Using this value, you need to make a query to the API again to extract the result.

Let’s see how this is done using the image (see Figure 12) located at https://bit.ly/2EGZ40Y.

Figure 12: An image containing some handwritten text

As usual, use cURL to query the recognizeText method. This time around, you need to use the -v option (for verbose) so that you can get the returning response header:

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2EGZ40Y"}'
'https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/
recognizeText?mode=handwritten' -v

You’ll see a whole bunch of text upon success. In particular, look for the value of the Operation-Content field (see Figure 13). Copy the URL.

Figure 13 : Observe the output of the cURL command

Then issue another cURL command, this time around to extract the result (using the URL that you have just copied):

$ curl -H 'Ocp-Apim-Subscription-Key:
<Subscription_Key>'
https://westcentralus.api.
cognitive.microsoft.com/vision/v1.0/
textOperations/
054a5cd6-964d-45f7-bc2a-622ded019d94

You’ll now get the result shown in Listing 4.

Besides returning the words, you also get the coordinates of each recognized word in the image. Something fun to do: write a Python application to display the image and overlay it with rectangles showing each of the words that have been found by the OCR service.

Using the Face API

So far, you’ve been looking at the Vision API. Let’s also take a look at the Face API. The Face API allows you to:

  • Detect and compare human faces
  • Organize images into groups
  • Identify previously tagged people in images

For this example, let’s use the image (see Figure 14) located at https://bit.ly/2VyAnIv.

Figure 14 : An image of Bill Gates

You can use the following command (remember that for this you have to use the key for the Face API, and not the Vision API):

$ curl -H 'Ocp-Apim-Subscription-Key: <Subscription_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2VyAnIv" }'
'https://westcentralus.api.
cognitive.microsoft.com/face/v1.0/detect?
returnFaceLandmarks=true&returnFaceAttributes'

It returns the result shown in Listing 5.

Using this result, you can know the location of each of the features of the face, such as the eyes, nose, lips, and eyebrows.

Using the Vision API in Python,

Up until this point, you’ve been playing with the Vision and Face APIs through the command line using cURL. Of course, developer, cURL is simply not for the end user—it’s a development tool. So in the following sections, I’m going to show you how to use the various APIs in the various platforms: Python, iOS, and Android.

Let’s get started with Python first. Create a file named visionapi.py and populate it with the code shown in Listing 6.

Listing 6 shows how you can use the Vision API’s Analyze service to get a description of an online image (located at https://bit.ly/2apR8in) containing a hot air balloon. Once the description is obtained, you’ll use the matplotlib library to display the image, as well as the description and tags associated with the image.

To run the Python code, type the following command in Terminal:

$ python visionapi.py

Figure 15 shows the output of the Python code.

Figure 15 : Output of the Python code showing the image with the description and associated tag

What if the image is located locally and not online? Listing 7 shows the modified Python code (statements bolded to show the addition).

You’ll now be able to load the image locally, send it to the Vision API and get the response.

Using the Vision API in iOS

In the previous section, you saw how to use the Vision API in Python. Let’s now use the Vision API in a mobile app. Let’s start with iOS first.

Using Xcode, create a new Single View Application project and name it VisionAPI. In Main.Storyboard, add the following views to the View window (see Figure 16):

  • Label
  • ImageView
  • TextView
Figure 16 : Populating the View window with the various views

Create outlets for the ImageView and TextView views in ViewController.swift (be sure to visually connect them to the views on the View window):

import UIKit
class ViewController: UIViewController {
    @IBOutlet weak var lblResult: UITextView!
    @IBOutlet weak var img1: UIImageView!
    @IBOutlet weak var img2: UIImageView!

Add the statements in bold in Listing 8 to the ViewController.swift file.

In the Main.Storyboard file, set the Tag attribute of the second ImageView to 1 (see Figure 17). This is to allow the code to be able to differentiate between the two ImageView views.

Figure 17 : Setting the Tag for the second ImageView

Add the following statements in bold to the viewDidLoad() function in ViewController.swift:

    override func viewDidLoad() {
        super.viewDidLoad()
        
        var url = URL(string: image1URL)
        var data = try? Data(contentsOf: url!)
        img1.image = UIImage(data: data!)
        
        url = URL(string: image2URL)
        data = try? Data(contentsOf: url!)
        img2.image = UIImage(data: data!)
        
        //---make the images tappable---
        let tapGestureRecognizer1 =
            UITapGestureRecognizer(
              target: self,
              action: #selector(
          imageTapped(tapGestureRecognizer:)))
        img1.isUserInteractionEnabled = true
        img1.addGestureRecognizer(
            tapGestureRecognizer1)
        
        let tapGestureRecognizer2 =
            UITapGestureRecognizer(
              target: self,
              action: #selector(
          imageTapped(tapGestureRecognizer:)))
        img2.isUserInteractionEnabled = true
        img2.addGestureRecognizer(
            tapGestureRecognizer2)
    }

Press Cmd-R to deploy the application onto the iPhone Simulator. Tap one of the images and observe the message displayed on the screen (see Figure 18).

Figure 18 : Testing the application on the iOS Simulator

Using the Vision API in Android

Let’s now work on a similar app, but this time for Android.

Using Android Studio, create a new project and name it UseMSCognitive. Add the following statement in bold to the AndroidManifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=
    http://schemas.android.com/apk/res/android
    package=
      "com.example.weimenglee.usemscognitive">
    <uses-permission
      android:name="android.permission.INTERNET"
    />
    <application android:allowBackup="true"
        android:icon="@mipmap/ic_launcher
        android:label="@string/app_name"
        android:roundIcon=
          "@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name=
                "android.intent.action.MAIN" />
                <category android:name=
          "android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

This addition is needed because you need Internet access to access the Vision API service. Add the statements in bold to the activity_main.xml file as shown in Listing 9. The additions are to build the UI for the Android app.

Finally, add the statements in bold to the MainActivity.java file, as shown in Listing 10.

Run the application on the Android emulator. Clicking on either image will display the result shown in Figure 19.

Figure 19 : Testing the application on the Android Emulator

Custom Vision

Phew! You’ve seen quite a lot in action. But I saved the coolest for last. One of my favorite features in the Microsoft Cognitive Services is the Custom Vision Service. The Custom Vision Service allows you to train learning models to recognize your own custom images. For example, you can use the Custom Vision Service to build a learning model to recognize images of durians. Best of all, the learning model that you’ve trained can be exported as a CoreML or TensorFlow model for use in mobile applications. The best way to learn more about this is to try it out. So let the fun begin!

Using your Web browser, go to https://www.customvision.ai/ and sign in. Click NEW PROJECT (see Figure 20).

Figure 20 : Creating a new project in Custom Vision

Enter the following details and then click Create project (see Figure 21).

Figure 21 : Entering the details for the project to recognize durians

Click Add images (see Figure 22). Select the series of durian images that you have prepared beforehand (you can always use Google to find a series of durian images).

Figure 2 2: Click the Add Images button to add images to your project for training.

Assign the tag of "durian" and click the Upload 19 images button (see Figure 23):

Figure 23 : Tagging and uploading the series of durian images

Once the images are uploaded, click the Train button (see Figure 24):

Figure 24: Click the Train button to start the training

Once the training is done, click the Quick Test button (see Figure 25):

Figure 25 : Click the Quick Test button to test the model.

Click the Browse local files (see Figure 26) button and select a test image.

Figure 26 : Uploading a test durian image

Figure 27 shows the result of the test. I’ve uploaded an image containing a soursop and the model predicted that it is only 3.3% confident that it’s a durian.

Figure 27 : The mode is only 3.3% confident that the image is a durian.

Figure 28 shows another test image. This time the model predicted that it is 95% confident that it is a durian!

Figure 28 : The mode is 95% confident that the image is a durian.

Interestingly, when I used a test image of a jackfruit (see Figure 29), the model predicted that it is 97.6% confident that it is a durian. This is because I’ve only used 19 images for training. If I used more images containing different parts of the durian, I’d get a more accurate prediction.

Figure 29 : Wrongly predicting that a jackfruit is a durian

Obtaining the Prediction API

Once the model is trained, you want it to be published it so that it’s available programmatically. To do so, click the Performance tab (see Figure 30) and then click the Prediction URL link.

Figure 30 : Locating the Prediction URL link

You will see the information as shown in Figure 31.

Figure 31 : Save the details of the Prediction API

Take note of the two URLs and the Prediction-Key.

Using cURL to Access the Prediction API

Now that the learning model is published publicly, you can test it using cURL. For this, you’ll make use of the image (see Figure 32) located at: https://bit.ly/2yKVhdE.

Figure 32 : A test image of a durian

In Terminal, type the following command (the <Prediction_Image_URL> refers to the first URL that you saw in Figure 31):

$ curl -H 'Prediction-Key:
<Prediction_Key>'
-H 'Content-Type: application/json'
-d '{"url":"https://bit.ly/2yKVhdE"}'
'<Prediction_Image_URL>'

You should see the following output:

{
  "id": "380fa20b-e483-442f-ae16-f5b12e484858",
  "project":
     "0104d173-00b2-453d-926c-0d78b74edf42",
  "iteration":
     "048cde7d-ceee-4dc8-9687-0aefb5fce986",
  "created": "2018-10-31T04:17:06.8759444Z",
  "predictions": [{
    "probability": 0.9991205,
    "tagId":
      "78439faa-4e37-461c-9ed7-e9a0f7a60501",
    "tagName": "durian"
  }]
}

The result indicates that the model is 99.91% confident that the image is a durian.

Exporting the Model to CoreML (iOS)

With the model tested to work correctly, let’s now export the model so that you can use it in your iOS and Android apps.

Using your Web browser, go to: https://www.customvision.ai/projects. Select the Durians project (see Figure 33).

Figure 33 : Locating the Durians project you created earlier

Click on the gear icon, as shown in Figure 34.

Figure 34 : Configuring the project

Scroll down the page and select General (compact) and then click Save Changes (see Figure 35).

Figure 35 : Converting the project to General (compact)

Click the Train button located at the top of the page. Then, click the Performance tab and then click Export (see Figure 36).

Figure 36 : Exporting the trained model

Select the iOS platform (see Figure 37). You will download the Tensorflow (TF) model later to use on the Android platform.

Figure 37 : Exporting the model for iOS (CoreML) and Android (TensorFlow)

Click Export and then Download. A file named something like 0bbfed18d17a43258828d3a710b8b9e8.mlmodel will now be downloaded onto your computer. Rename it Durians.mlmodel.

To make it really easy to test your iOS app, Microsoft has a sample app already written for you. Download the sample code for iOS at: https://github.com/Azure-Samples/cognitive-services-ios-customvision-sample.

Launch the sample code using Xcode. Drag and drop the Durians.mlmodel file that you have downloaded earlier into the project (see Figure 38).

Figure 38 : Drag and drop the Durians.mlmodel file into the Xcode project.

In the ViewController.swift file, locate the following block of code and make the following changes in bold:

  let targetImageSize = CGSize(width: 227,
    height: 227)
   // must match model data input
  
  lazy var classificationRequest: [VNRequest] =
  {
    do {
      // Load the Custom Vision model.
      // To add a new model, drag it to the
      // Xcode project browser making sure
      // that the "Target Membership" is
      // checked.
      // Then update the following line with
      // the name of your new model.
      let model = try VNCoreMLModel(for:
          Durians().model)
      let classificationRequest =
          VNCoreMLRequest(model: model,
          completionHandler:
            self.handleClassification)
      return [ classificationRequest ]
    } catch {
      fatalError(
       "Can't load Vision ML model: \(error)")
    }
  }()

Deploy the application onto an iOS device. Point the camera at the picture of a durian and observe that the app will display a pop up displaying the word "durian" (see Figure 39).

Figure 39 : The iOS app displays the caption "durian" when you point the camera at images of durians.

Exporting the Model to TensorFlow (Android)

Finally, let’s see how to use the trained model on Android. Back in the Export page, click TF to download the model for Tensorflow. Click Export and then Download.

Once the zip file is downloaded, unzip it and it should contain two files:

  • labels.txt
  • model.pb

Like its iOS counterpart, Microsoft has also written a sample Android app for you to quickly test your model. Download the sample Android app from: https://github.com/Azure-Samples/cognitive-services-android-customvision-sample. Once the project is downloaded, open it in Android studio.

Replace the two files in the assets folder with the ones that you have just downloaded (see Figure 40).

Figure 40 : Replacing the two files in the assets folder with the ones you’ve just downloaded

Deploy the application on an Android device. Point the camera at the picture of a durian and observe that the app displays a pop up displaying the word "durian" (see Figure 41).

Figure 41 : The Android app displays the caption "durian" when you point the camera at images of durians.

Summary

In this article, I’ve walked you through some of the services in the Face and Vision APIs available in the Microsoft Cognitive Services. At the same time, I’ve showed you how to integrate them into your Python, iOS, and Android apps. The final section of this article talked about custom vision, and this is something that is very interesting and hopefully that has given you some good ideas about the types of applications you can build using the Microsoft Cognitive Services.