After all the preparations, the conversion is simple. You just have to run your machine learning Python file and wait for the mlmodel file to be created in your destination folder. They, you can directly use it in Xcode and get all the model information that you are used to. The Python code for the model conversion can be used for different models, which means that you can use that code as a template for machine learning models that you find or that you create.
- [Instructor] Now we can finally convert…our existing machine learning model…into the ML model format that we need for Xcode.…And we're going to use the terminal again,…but if you have a look at your access files,…then you will find in the beginner folder a names,…python file, and a namesDataset CSV file.…And this CSV file actually contains a ton…of first names and their gender.…So these are about 100,000 names…that we use to train our model.…
This is coming from the social security website…from the United States, and this Python here is responsible…for the training of this machine learning model.…And at the bottom of it we have the conversion…to the CoreML model where we can also add all…of the parameters that we saw in Xcode earlier.…So this is our machine learning model that we'd now like…to convert into a ML model format.…And I'm currently in the end folder in our exercise files.…
This is also visible here in the terminal.…I have the names.py file and the namesDataset file.…Now all I need to do is…call in Python, names.py, and hit return.…
- What are machine learning, Core ML, Vision, and NLP?
- Adding a machine learning model to a project
- Getting predictions from machine learning models
- Converting existing machine learning models for Core ML
- Classifying images and detecting objects with Vision and Core ML
- Analyzing natural language text with NSLinguisticTagger