Create Image Classifier Model using Create ML App

Create Image Classifier Model using Create ML App


Train a machine learning model to classify images, and add it to your Core ML app.

Open Create ML App. Xcode -> Open Developer Tool -> Create ML



Select a TemplateImage -Image Classifier, Object Detector.
Sound -Sound Classifier.
Motion -Activity Classifier.
Text -Text Classifier, Word Tagger.
Table -Tabular Regressor, Tabular Classfier.


Select Image Classifier -> Next -> Fill Project Details like Project Name, Auther, Licence, Description. Now you will see below Screen.



Now Configure the input Training just drag and drop your Training Data or
Training Data-> Choose Files Add Training Data Folder


We Have Two folders
1. Testing Data
2. Training Data


Under the Training Data, We have a List of Objects we want to train.

Folder like,
Training Data
| — Apple
| — Orange
| — Banana
| — ….


Use at least 10 images per folder for the training set,
But Use More Images
Balance the number of images for each label. Don’t use 10 images for Apple and 1000 images for Orange.


Now Train The Image Classifier
Click the Play button at the top of the Project window. The image classifier shows its progress as it learns from your training images.


Train your images

Training Accuracy:


Training And Validate ProcessAs a part of the training process, Create ML automatically splits your training data into a training set and a validation set. The model iteratively learns from the training set and with each iteration, the model checks its own accuracy with the validation set. Because Create ML splits the data randomly into these two sets, you might get a different result each time you train the model

Testing DataDrag your Testing folder from the Finder onto the Testing section or Select
-> Choose Files Add Testing Data Folder in your Testing project window.
Testing Data Folder,
Testing Data
| — Apple
| — Orange
| — Banana
| — ….
In Folders contains Testing images,

Drag and drop Testing Folder:



Click Test Model See Results in Below:


Drag and Drop to Testing ImagesIn Output window drag and drop images To check instantly.

Drag and drop to check images:



Easy to ExportDrag the model icon from the output tab to a directory in Finder to save the model to a file in the .mlmodel format.

Save myFruits.mlmodel




Create Image Classifier Model using Create ML App

Comments

Popular posts from this blog