Create Object Detection (CoreML) Model for IOS with Apple’s Turi Create in Windows/Google Colab

After searching from various sources to create a detection model for ios i’ve summarized my work in this blog so that it will be easier for everyone to create any machine learning model for ios even if they don’t have a mac.

Turi Create simplifies the development of custom machine learning models. You don’t have to be a machine learning expert to add recommendations, object detection, image classification, image similarity or activity classification to your app. Easy-to-use: Focus on tasks instead of algorithms.

The purpose of this blog is to train and create a model compatible for ios application even if you don’t have a mac. You can train a model in google colab irrespective of any OS. The advantage of using colab is because of it’s GPU support which makes training super fast.


Image Setup

I simplified this into one step with since the annotations column requires the label (the object and other_object training labels above). Combining this into one step made more sense, and made it easier to not have to hardcode a training label name anymore. It will now use the subdirectory name from images/ (object and other_object above), and can prepare any number of objects for detection.

python out.csv

Training the Model

All that is needed is to set the modelName variable to whatever you want to use in Xcode.

At the end of the train script, you should have a modelName.model folder and modelNameClassifier.mlmodel for use to drag and drop into your Xcode project.

Works at Luxoft