Skip to content

Brief introduction to CreateML and Model creation with small example of CatDog model + Detection Project in Swift.

License

Notifications You must be signed in to change notification settings

Dr-Groot/CreateML_CoreML-Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CreateML-CoreML-DogCat-Swift

CreateML

Use Create ML with familiar tools like Swift and macOS playgrounds to create and train custom machine learning models on your Mac. You can train models to perform tasks like recognizing images, extracting meaning from text, or finding relationships between numerical values.

image

You train a model to recognize patterns by showing it representative samples. For example, you can train a model to recognize dogs by showing it lots of images of different dogs. After you’ve trained the model, you test it out on data it hasn’t seen before, and evaluate how well it performed the task. When the model is performing well enough, you’re ready to integrate it into your app using Core ML.

image

Create ML leverages the machine learning infrastructure built in to Apple products like Photos and Siri. This means your image classification and natural language models are smaller and take much less time to train.

Now we will create a ML model using CreateML,

First open CreateMl and select Image Classification option and provide a name to your model. Screenshot 2023-01-28 at 4 04 32 PM

After that we will jump to a screen like this, here we have to provide data for creating a model. We are using data that contains Dogs and Cat images, also you can see in the console that we have to provide two type of data first is Training Data and second is Testing Data. Training data is used to train a ML model and Testing data is used to test our ML model that we have created. Next we will provide data to respective places. Screenshot 2023-01-28 at 4 05 49 PM

Now you can see that we have 2 classes and 24 items in training and for testing we have 2 classes and 8 items. Next is we have to start training the model. Screenshot 2023-01-28 at 4 06 37 PM

Model training strated. Screenshot 2023-01-28 at 4 07 56 PM

After completion we have our evaluations which shows we have successfully trained the data and test it with 100% precision in each cases. Screenshot 2023-01-28 at 4 11 48 PM

Now your model is ready to download. Screenshot 2023-01-28 at 4 12 08 PM

Project

In this project we are using same model which we have created and here we can select image via gallery or by camera. IMG_1982

After selecting the image we get our results in the form of confidence percenetage form IMG_1983

To know more about CoreML working you can check my CoreML Object Detection project on github.

About

Brief introduction to CreateML and Model creation with small example of CatDog model + Detection Project in Swift.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages