Machine Learning on iOS with Keras and CoreML
Branch: master
Clone or download
Pull request Compare This branch is 2 commits ahead, 5 commits behind r4ghu:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Screenshots
iOS-CoreML-MNIST.xcodeproj
iOS-CoreML-MNIST
model
README.md

README.md

Machine Learning on iOS with Keras and CoreML

This is the implementation of Number recognition using Keras-MNIST model on Apple's CoreML Framework.

The app fetches image from your hand writing and perform number recognition in real-time right on the device.

Requirements

  • Xcode 9
  • iOS 11
  • For training: Python 3.6 (install keras, h5py, tensorflow and coremltools)

Training the model

(coreml) $ pip install tensorflow keras h5py coremltools
(coreml) $ sudo python create_cnn_model.py
(coreml) $ sudo python convert_mode.py

Running the app

To use this app, open iOS-CoreML-MNIST.xcodeproj in Xcode 9 and run it on a device with iOS 11. (You can also use simulator)

Companion article

If you are interested in training your custom MNIST model from scratch, a step-by-step tutorial is available at - Link

You can find the companion article here

YouTube Video

You can watch my YouTube video on this topic here

Results

These are the results of the app when tested on iPhone 7.

Result 1 Result 1 Result 1 Result 1 Result 1 Result 1 Result 1 Result 1 Result 1 Result 1 Result 1

Thanks

Thanks to Sri Raghu Malireddi / @r4ghu whose app I cloned for this tutorial.