On-Device Machine Learning with SwiftUI and PyTorch Mobile

This tutorial guides you through building a simple image classification iOS app that demonstrates how to integrate PyTorch Mobile with SwiftUI.

Peter Pan
Intuitive Machine Learning

--

There are mainly two advantages of running Machine Learning model on your mobile:

1. Saving Money

As a small startup or indie developer, you are probably not able to afford the high cost to run a service or use some existing API. Let’s take google cloud for example. In our use case, label detection, suppose if you have 10k users and every user upload 10 images every day. It will cost you around $4500/month by calling the online API. This tutorial provides a method that will cost you absolute $0 by using on-device machine learning to achieve the same goal.

Google Vision API price guide

2. Privacy

On-device machine learning ensures user privacy. There is no need to transmit user data to the cloud and store there.

In this tutorial, we are going to guide you through building a simple image classification iOS app that demonstrates how to integrate PyTorch Mobile with SwiftUI. Get started by downloading the materials for this article.

Getting Started and Preparing the…

--

--

Peter Pan
Intuitive Machine Learning

PhD. & Research Scientist at Facebook, Machine Learning, NLP|Speech