{"id":27379294,"url":"https://github.com/samuelfolledo/custom_ai_in_ios","last_synced_at":"2026-05-03T23:33:42.969Z","repository":{"id":101398567,"uuid":"351341468","full_name":"SamuelFolledo/Custom_AI_in_iOS","owner":"SamuelFolledo","description":"Object detection iOS app that scores rock paper scissor game for you","archived":false,"fork":false,"pushed_at":"2022-08-28T21:57:06.000Z","size":225140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T13:49:11.087Z","etag":null,"topics":["machine-learning","object-detection","python","swift","swiftui","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelFolledo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-03-25T07:10:36.000Z","updated_at":"2022-12-01T17:53:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"72c7ae78-bfa5-4d2a-bdda-ebbcdf181a0d","html_url":"https://github.com/SamuelFolledo/Custom_AI_in_iOS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamuelFolledo/Custom_AI_in_iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFolledo%2FCustom_AI_in_iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFolledo%2FCustom_AI_in_iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFolledo%2FCustom_AI_in_iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFolledo%2FCustom_AI_in_iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelFolledo","download_url":"https://codeload.github.com/SamuelFolledo/Custom_AI_in_iOS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFolledo%2FCustom_AI_in_iOS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269832882,"owners_count":24482330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","object-detection","python","swift","swiftui","tutorial"],"created_at":"2025-04-13T13:45:35.240Z","updated_at":"2026-05-03T23:33:37.948Z","avatar_url":"https://github.com/SamuelFolledo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to Create an Machine Learning Model from scratch and use it in an iOS app\n\nThis is a tutorial on how to create your own Machine Learning model from scratch and how to use it in your iOS app. \n\n## ML Model Type\nThis 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.\n\n## Tools and Tech Stacks\n### Machine Learning Tools\n- **[IBM Cloud Annotation](https://cloud.annotations.ai/)** - for labeling our dataset\n- **Jupyter Notebook** - run our Python codes as well as creating, training, and saving our machine learning model\n- **Libraries** - TuriCreate, Pandas\n\n### iOS Development Tools\n- **Xcode** - best IDE for iOS development\n- **Libraries** - CoreML, UIKit\n\n## Initial Setup for ML\n**Note:** Only follow these instructions once. For updating or reopening, refer to the instructions under *How to Update Machine Learning Model*\n1. With this repo downloaded, open Terminal and change directory to the project's directory\n2. In Terminal, enter `$ cd ML`\n3. If needed, install Python's [virtualenv](https://docs.python.org/3/tutorial/venv.html) to have an isolated Python environment.\n    `$ pip install virtualenv`\n    - *For a cheat sheet for virtualenv, click [here](https://zetcode.com/python/venv/)*\n4. In Terminal, enter `$ python3 -m venv ML_Model_Env` to create a Python virtual environment on the ML_Model_Env\n5. In Terminal, enter `$ cd ML_Model_Env` to go inside that directory\n6. In Terminal, enter `$ source bin/activate` to activate Python environment. It should look like below\n\u003cimg src=\"https://github.com/SamuelFolledo/Custom_AI_in_iOS/blob/master/static/images/python-env-activated.png?raw=true\" width=\"400\"\u003e\n\n7. Install these libraries and its dependencies by running:\n    - `(ML_Model_Env) ➜  ML_Model_Env $ pip3 install turicreate`\n    - `(ML_Model_Env) ➜  ML_Model_Env $ pip3 install jupyter`\n8. 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**\n9. Once you are done, enter in Terminal `(ML_Model_Env) ➜  ML_Model_Env $ deactivate` to clean state and remove all installed packages\n\n## How to Update Machine Learning Model\n1. With this repo downloaded, open Terminal and change directory to the project's directory\n2. In Terminal, enter `$ cd ML/ML_Model_Env` to go to ML_Model_Env directory\n3. In Terminal, enter `$ source bin/activate` to activate Python environment. It should look like below\n\u003cimg src=\"https://github.com/SamuelFolledo/Custom_AI_in_iOS/blob/master/static/images/python-env-activated.png?raw=true\" width=\"400\"\u003e\n\n4. In Terminal, enter `(ML_Model_Env) ➜  ML_Model_Env $ jupyter notebook` to launch Jupyter Notebook in your browser and then open **Model Creator.ipnyb**\n\n## External Links\n- [IBM Cloud Annotations Introduction](https://cloud.annotations.ai/workshops/object-detection/index.html)\n- [IBM Cloud Annotations Documentation](https://cloud.annotations.ai/docs)\n\n\n## For questions or opportunities, contact me at:\n- [LinkedIn](https://linkedin.com/in/samuelfolledo)\n- Email: samuelfolled@gmail.com\n- [MakeSchool portfolio](https://www.makeschool.com/portfolio/samuelfolledo) - Expected gradutation date August 2021\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelfolledo%2Fcustom_ai_in_ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelfolledo%2Fcustom_ai_in_ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelfolledo%2Fcustom_ai_in_ios/lists"}