This is a tutorial on how to create your own Machine Learning model from scratch and how to use it in your iOS app.
This tutorial will be a YOLO (You Only Look Once) type of machine learning model as speed is a huge requirement for mobile devices. YOLO is one of the single stage detectors that runs the classifier once on the input image and do all of the work in a single pass.
- IBM Cloud Annotation - for labeling our dataset
- Jupyter Notebook - run our Python codes as well as creating, training, and saving our machine learning model
- Libraries - TuriCreate, Pandas
- Xcode - best IDE for iOS development
- Libraries - CoreML, UIKit
Note: Only follow these instructions once. For updating or reopening, refer to the instructions under How to Update Machine Learning Model
- With this repo downloaded, open Terminal and change directory to the project's directory
- In Terminal, enter
$ cd ML
- If needed, install Python's virtualenv to have an isolated Python environment.
$ pip install virtualenv
- For a cheat sheet for virtualenv, click here
- In Terminal, enter
$ python3 -m venv ML_Model_Env
to create a Python virtual environment on the ML_Model_Env - In Terminal, enter
$ cd ML_Model_Env
to go inside that directory - In Terminal, enter
$ source bin/activate
to activate Python environment. It should look like below
- Install these libraries and its dependencies by running:
(ML_Model_Env) ➜ ML_Model_Env $ pip3 install turicreate
(ML_Model_Env) ➜ ML_Model_Env $ pip3 install jupyter
- In Terminal, enter
(ML_Model_Env) ➜ ML_Model_Env $ python3 -m notebook
to launch Jupyter Notebook in your browser and then open Model Creator.ipnyb - Once you are done, enter in Terminal
(ML_Model_Env) ➜ ML_Model_Env $ deactivate
to clean state and remove all installed packages
- With this repo downloaded, open Terminal and change directory to the project's directory
- In Terminal, enter
$ cd ML/ML_Model_Env
to go to ML_Model_Env directory - In Terminal, enter
$ source bin/activate
to activate Python environment. It should look like below
- In Terminal, enter
(ML_Model_Env) ➜ ML_Model_Env $ jupyter notebook
to launch Jupyter Notebook in your browser and then open Model Creator.ipnyb
- Email: samuelfolled@gmail.com
- MakeSchool portfolio - Expected gradutation date August 2021