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.
- 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)
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
You can watch my YouTube video on this topic here
These are the results of the app when tested on iPhone 7.
Thanks to Sri Raghu Malireddi / @r4ghu whose app I cloned for this tutorial.