When AI goes Peltarion

A while ago, I wrote a blog post on convolutional networks (A gentle introduction to Image Recognition by Convolutional Neural Network) in which I described the mathematics and inner workings of these networks. To write the post I created a model to classify “birds” and “airplanes” from a training set containing a total of 8000 images and obtained a 98,5% accurate model, after some time coding the model and a lot of fine-tuning.

Every now and then you stumble on something that simplifies your life to such extent that it gives you the chance to develop models for different purposes simultaneously and test different models without having to write a single line of code or lock your computers to any other works because all your power is being used and gives you the chance to compare model performance as it is being run. Then comes, of course, the issue of actually deploying your model and all that it entails.

Sopra Steria has just become partners with a company that has developed a platform for oprational AI, namely Peltarion. Peltarion was founded in Stockholm in 2004 and has become a major player in operational AI. The Peltarion team is led by engineers that formerly worked for Spotify, Skype, King and TrueCaller. Their goal? To make AI technology usable and affordable for all.

So, to show some of the functionalities of this newly acquired platform, I want to revisit my “Bird-Airplane” blog. I could of course have chosen any of the other examples that we have tried since we started using Peltarion but I want to give the reader the possibility to compare the results using this blog post and the previously mentioned one.

Let’s start by describing the environment of the Peltarion platform. What are the steps in creating and developing a model? One needs data, describe a training set, a validation set, create a model, train and evaluate it and finally (hopefully) deploy it, right? The platform is laid out it in exactly that manner:

environment1
Figure 1: Peltarion environment

Peltarion does not for the moment offer the possibility to treat data within the platform, which means that all data preparation has to be done outside. The uploadable formats for data are the following:

  1. csv files
  2. npy-files (useful for example if of you wish to do sound recognition)
  3. zip-files: The compressed directory needs to contain an index file indicating the path to images or sounds. One little drawback (though easily overcome with the help of one’s memory) is that this index file needs to be called “index”.

The files can be dragged to the platform or uploaded by choosing a file:

upload.png
Figure 2: Uploading files

So, in Figure 1 above you can see that I have called my project “Bird is the Word” and that I have uploaded a dataset called “Airborne“, defined the input (images of birds and airplanes) and the categories (bird or airplanes). Once this is done, you can save the dataset and proceed with the modeling. As always, you need to determine which kind of model is the most appropriate for your purposes. If you are content with a simple CNN (Convolutional neural network), then the Peltarion platform has ready to use models, as can be seen  in Figure 3.

Reasytouse
Figure 3: Peltarion offers the possibility to use ready-to-use models, among which CNN and ResNet-50 are just a few of them.

However, if your problem requires multiple concatenated convolution steps, poolings and more than two layers, you may want to build your own network. A page entitled “blocks” allows you to choose the different components of your network and building a suitable solution. Each time a building block has been chosen, you are invited to set the different parameters of each block.

Buildown
Figure 4: Building your own model
BuildownParameter
Figure 5: Setting each block’s parameters.

As can be seen in Figure 5, one can choose the filter size and the stride of that filter across the image. The same goes for all the blocks that one may choose apart from those that require no settings. In our example, we set the activation of the last layer to SoftMax and the number of nodes to 2 since there are only two categories, birds and airplanes, to consider. As is expected, we even set the loss function of the target to Binary cross entropy (In higher dimensional cases, we would set it to Categorical cross entropy).

The next step is to start the training of a model. In Figure 6 below is a view of the last adjustments you can set before starting the model, such as the learning rate, the batch size and the number of epochs.

startmodel
Figure 6: Starting the training of a model and setting the batch size, number of epochs and learning rate

 

One of the major issues when one trains a model is the time it takes and more importantly, the fact that you need to train different models sequentially. That is, once a model is trained and you aren’t really happy with the result and decide to tune the model, you have to wait until that new model is done with its training and then compare the result with the previous one. In other words, this is a time-consuming drag. Enter one of the fascinating features of the Peltarion platform. You can train up to 50 competing models and evaluate their performances in real-time! This enables you to quickly abandon some models and keep only the good ones going. If the structure of all the competing models is the same it suffices to duplicate the preceding model and simply adjust the parameters.

In the Peltarion Evaluation page, you can follow how well the different models are performing, read the different measurements and evaluate which epoch gives the best result.

evaluation.png
Figure 7: The evaluation view. Determining the best model.

 

Once you have determined which model is best you certainly want to deploy it in some solution you have constructed. As usual you need some information to do so. Either giving some URL, some token or a curl and an output example. This is automatically provided by the platform.

deployment.png
Figure 8: Deployment of models

Want to test your model before deployment? No problem. Peltarion offers its users a test environment in which you feed the deployment information.

Peltarion does not only offer a practical and efficient solution. It even gives access to different tutorials covering all areas of the platform and different types of models, making modeling accessible to beginners in AI.

Check it out! They even have trial periods.

peltarion

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: