🎓intermediate⏱15 min.SAP BTP Sdk For IosIntermediateIosMobileOdataSAP Business Technology PlatformSAP Mobile Services
You will learn
โWhat Create ML is
โHow to create an Image Classification Model [ACCORDION-BEGIN [Step 1: ](Introduction to Create ML)] Since MacOS 10.14 developers have the opportunity to use Create ML as a tool to train different types of Core ML models to be used in your apps. Currently Apple supports the following types of models: Image:
โMLRegressor If you’re interested in a more detailed description on how to use and create those models you can take a look at Apple’s official documentation about Create ML and the API documentation. With this easy to use tool you can quickly create, train, and test the above mentioned ML models via Templates. [DONE] [ACCORDION-END] [ACCORDION-BEGIN [Step 2: ](How to create an Image Classification Model project)] For this tutorial series you’re going to need an Image Classification Model to identify products. 1. After you have installed Create ML you should see a popup asking you to create a New Document. Please select that to reach the template screen in Create ML. !Create ML2. Now please select the Image Classifier template as a starting point and click on Next. !Create ML3. Fill out the required fields like the following and click on Next: | Field | Value | | ————- | ————- | | Project Name | ProductImageClassifier | | Author | Your name | | Description | A machine learning model that has been trained to recognize images. When you give it an image, it responds with a label for that image. It is trained on product images. |Create MLCreate ML will ask you for a location to safe the project at. Please select your preferred location and click on Create. You should see the project opening up. !Create ML[DONE] [ACCORDION-END] [ACCORDION-BEGIN [Step 3: ](Train the Image Classification Model)] In order to train your model in the created project you need images of products. As this is just an example you need only a few images for this tutorial series. Let’s try and get 5-10 images of Laptops including MacBooks as well as office chairs. There are several ways you can get those images: 1. Take the pictures yourself from different angles of the product and a variety of products. 2. Download images from the internet to train your model on. Please make sure you’re not using copyright images because it could be that you need the rights for using those. 3. Use one of many training image pools online. Personally I’ve just taken a bunch of pictures around the office and train the model on those. Of course if you have a productive model you need to train it on far more then just 5-10 images. If you have all images ready you have to structure them in a specified way for Create ML to successfully train your model. The folder structure needs to look like the following: !Create MLThe training data and the testing data need to be different images for Create ML training and testing properly. After you’ve chosen your training and testing data inside of Create ML you could add different Augmentations if you want to but for now this is not necessary. !Create MLTo create a Core ML model you just have to hit Train located on the top of Create ML. !Create MLAfter Core ML runs the training you will get results similar to the following screenshot. This data allows you to understand your model, how accurate it is and how you might need to tweak the training to get better results. The model should work just fine and you can export it onto the hard-drive or directly into Xcode. !Create MLPlease export the model directly into Xcode and then continue with the next tutorial. !Create ML!Create MLCongratulations! You’ve trained a Core ML model with Create ML. Feel free to play around more with Create ML and the Machine Learning capabilities with Artificial Intelligence. [VALIDATE_3] [ACCORDION-END]
If you’re interested in a more detailed description on how to use and create those models you can take a look at Apple’s official documentation about Create ML and the API documentation.
With this easy to use tool you can quickly create, train, and test the above mentioned ML models via Templates.
Step 2How to create an Image Classification Model project
+
For this tutorial series you’re going to need an Image Classification Model to identify products.
After you have installed Create ML you should see a popup asking you to create a New Document. Please select that to reach the template screen in Create ML.
!Create ML
Now please select the Image Classifier template as a starting point and click on Next.
!Create ML
Fill out the required fields like the following and click on Next:
Field
Value
Project Name
ProductImageClassifier
Author
Your name
Description
A machine learning model that has been trained to recognize images. When you give it an image, it responds with a label for that image. It is trained on product images.
Create ML
Create ML will ask you for a location to safe the project at. Please select your preferred location and click on Create.
You should see the project opening up.
!Create ML
Step 3Train the Image Classification Model
+
In order to train your model in the created project you need images of products. As this is just an example you need only a few images for this tutorial series.
Let’s try and get 5-10 images of Laptops including MacBooks as well as office chairs. There are several ways you can get those images:
Take the pictures yourself from different angles of the product and a variety of products.
Download images from the internet to train your model on. Please make sure you’re not using copyright images because it could be that you need the rights for using those.
Use one of many training image pools online.
Personally I’ve just taken a bunch of pictures around the office and train the model on those. Of course if you have a productive model you need to train it on far more then just 5-10 images.
If you have all images ready you have to structure them in a specified way for Create ML to successfully train your model.
The folder structure needs to look like the following:
!Create ML
The training data and the testing data need to be different images for Create ML training and testing properly.
After you’ve chosen your training and testing data inside of Create ML you could add different Augmentations if you want to but for now this is not necessary.
!Create ML
To create a Core ML model you just have to hit Train located on the top of Create ML.
!Create ML
After Core ML runs the training you will get results similar to the following screenshot. This data allows you to understand your model, how accurate it is and how you might need to tweak the training to get better results.
The model should work just fine and you can export it onto the hard-drive or directly into Xcode.
!Create ML
Please export the model directly into Xcode and then continue with the next tutorial.
!Create ML!Create ML
Congratulations! You’ve trained a Core ML model with Create ML. Feel free to play around more with Create ML and the Machine Learning capabilities with Artificial Intelligence.
Share feedback on this tutorial or join the conversation in SAP Community.
Submit detailed feedbackDiscuss in Community
Steps
Step 1 of 3
1. Introduction to Create ML2. How to create an Image Classification Model project3. Train the Image Classification Model
Joule
AI Notice
Joule is an AI assistant. Generative AI may produce inaccurate, incomplete, or biased information. Always verify important details before acting on them.
Conversations are sent to SAP-hosted large language models for processing. Do not include personal data, credentials, or confidential information in your messages.
Joule's responses are based on the SAP tutorial catalog and may not reflect the latest product changes. For authoritative guidance, consult the linked tutorials and official SAP documentation.