Xylos brands

A Closer Look at AI: AI Models in Practice

Artificial intelligence (AI) is everywhere these days. It’s nothing short of a media hype: we read, write and talk about it – and we expect a lot from it. In this blog post, we’ll give you the basics of how you can roll out and implement an AI model.

Our best tip: gather information about AI and machine learning first and learn how to use it in real-life situations. Think about the data your business processes generate and how you could improve the quality of these data. Don’t get stuck with a proof of concept you’ll never use; instead, integrate your first solutions into your business processes immediately. You’ll learn by doing, because practical experience will teach you what works and what doesn’t. This gives you the opportunity to adjust things quickly as needed.

In this blog post, we’ll talk about how you can roll out and use AI models in your organisation. Think of a model as a function (or a sequence of functions) that makes predictions based on part of your business data.

1. Image recognition

We’ll use an existing model that’s good at image recognition. These models are usually based on a ‘convolutional neural network’; they’re perfectly suited to link a category to an image, for example. The model’s input are the image pixels, the output is a list of probable results.

The image below results in the category ‘Egyptian cat’ with a probability score of about 94%.

ResNet50

Of course, the result depends on the model used. The model called ResNet50, which recognises 1,000 different categories, returns the category ‘Egyptian cat’. Its build was based on a dataset containing over 14 million images.  These images are linked to labels (category names) via Amazon’s crowdsourcing service, Mechanical Turk.

Computer Vision API

Another model (which is used by Microsoft’s Computer Vision API, for example) will just return the ‘cat’ category as the most probable result. This simple example already shows that the data you use and the way you build a model are major determining factors for your results – and that is where the problem often lies.

2. API

How do you use an AI model in your own applications? Since it’s just a function with input and output, you could roll it out as an API. The input and output will usually (but not necessarily) be JSON-format data.

In the external blog post Recognizing images with Azure Machine Learning and the ONNX ResNet50v2 model I’ll delve deeper into the technical details of rolling out a model with the Azure Machine Learning (AML) service. This post builds on Creating a GPU container image for scoring with Azure Machine Learning. In a nutshell, it tackles the following steps:

  • Selecting an existing model out of a ‘model zoo’. The post uses the ONNX Model Zoo. ONNX is a standard format to save and use models.
  • Creating a Docker container image with AML. AML makes sure the image is created in a standard manner, with GPU (Graphics Processing Unit) support if needed.
  • Rolling out the Docker image to Azure Kubernetes Service (AKS) or Azure Container Instances (ACI). The result of this step is a model that’s available as an API which you can use through your own applications.

3. IoT Edge platforms

Instead of rolling out the model in your own IT infrastructure or the cloud, you could also roll it out to another location - a vehicle, for example. To do this, you can use IoT Edge platforms supporting the same container images, such as Azure IoT Edge. The blog post Deploying Azure Cognitive Services Containers with IoT Edge tells you more about the subject.

Rolling out and using existing models can also be a good first step to understand how AI works in practice. Of course, the real challenge is building a model that offers you an advantage - by optimising a production process, for example.

Stay tuned. Want to know more about our AI solutions? Be sure to keep an eye on our blog.

Share this blogpost
Categories: Azure
Tags: Azure

Also interesting for you

Leave a reply

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