Fields of Blue by Exphrasis

Adding CoreML model to your Xamarin.iOS Projects

CoreML allows us to develop a Machine Learning project on iOS. Applications developed using CoreML can perform all kinds of tasks such as problem solving, image recognition using trained models.

We can do this with Xamarin.iOS. The first thing you have to do for this is to set ourselves a model. We download a model from the link below:

We then have to convert it to mlmodelc type to add Xamarin project. We can use Xcode or terminal for this. We should right click on folder that include our CoreML model and then select New Terminal at Folder. After that write tihs command in terminal;

xcrun coremlcompiler compile MyModel.mlmodel MyModel.mlmodelc

this gives us the output of .mlmodelc which we can use in our project. Once we add this model to our project, we can start to develop.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store