My model is not like your model

I’m not talking about models in the fashion world, but Machine Learning (ML) models to use in Apps. Everybody knows Artificial Intelligence (AI) and ML are on the rise, and it is becoming easier en easier to use it in your Apps.

Last year Apple introduced CoreML, stating that the programmer doesn’t’ need to know anything about ML/AI to apply it in Apps, and that’s correct. It is considered to be a black box. You input something, and you get an output. What and how the black box gets to the result is “magic”. For example, you input an image of an animal, and you get the name(s) of the animal(s) back. You input an image of a person, and you get the sex of the person back. You input a text, and you get the keywords back…
As a programmer you can use the existing models, which are mostly trained models. The results you get are as good as the model. Let’s say you get a model that was trained to recognize a list of objects. This means that the model will potentially recognize all objects that you specified. If you didn’t specify a bicycle, the model was never trained for it, and the model will never recognize a bicycle. This is a fixed model that doesn’t learn. The down side is that the users of your App can not teach or train the model to improve. In a lot of cases this is absolutely no problem. If you do need to train a model, this stops being a simple black box, and does require the programmer to know more about ML and AI.

For the simple programmers, like me, you try to find existing, trained models you can use, and you quickly see that there are not a lot of them. So you have a few options.
1. Find a model and convert it to your model if needed
2. Use an only, in the Cloud model, and connect to it through an API
3. Make your own model

Finding a model can be hard. There are differnt model formats out there (Caffe, Keras, Watson…) and converting them to, in my case mlmodel (Apple) is a challenge. You have to install stuff and use Python tools hoping to get a mlmodel you can use. I have to say this is a difficult step if you do not know how these model are setup. In this case the convention of the model is much more difficult than the implementation in the App. I hope Apple will make this easier.

More and more ML/AI Model Stores become available. Most allow you to access a model that is hosted in the Cloud. In general you pay for the CPU-time needed to process the request. For the developer, this is an easy solution, as we are used to connect to services in the Cloud. The down side is that you have to be connected, and you may sent a lot of data over your mobile connection, which costs money.

If the model you need is very specific, but not complex, you could train a model yourself. For example, you want to recognize different types of bicycles… There are more and more easy to use tools, that allow you to make a model and train in. Several desktop and Cloud solutions are available. Most of them are focused on one platform (iOS, Windows, Android…) or another, so be careful which one you use.

If you look at all this, you see that there is an emerging market for models to use in Apps. There is a need for specifically trained models, and it will become more and more easy to train a model with your data. As this is an emerging market, it is “normal” that there is not yet a good standardized approach to convert one model to another. But as this is all quickly falling into place, future Apps will be able to do new and amazing things.


Leave a Reply

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

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

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s