Skip to content
Real-time Number Recognition using Apple's CoreML 2.0 and MNIST -
Branch: master
Clone or download
Latest commit 7b7fb70 Aug 3, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Screenshots add screenshots Jul 6, 2017
iOS-CoreML-MNIST.xcodeproj Added fresh iOS code Aug 3, 2018
iOS-CoreML-MNIST Added fresh iOS code Aug 3, 2018
nnet Push Python3 code and CoreML 2.0 model Aug 3, 2018
.gitignore Push .gitignore Jul 8, 2018
README.md Update ReadMe.md Aug 3, 2018

README.md

iOS-CoreML-MNIST

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.

Requirements

  • Xcode 10.0 beta
  • iOS 12
  • For training: Python 3.6 (Keras 2.1.6, TensorFlow 1.5.0, CoreMLTools 2.0b1)

Usage

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

Training

If you want to train your own custom model, follow the tutorial given below to create an anaconda environment. Enter the environment and run the following commands in terminal with ./nnet as master directory.

(coreml) $ python train.py
(coreml) $ python convert.py

I also included a jupyter notebook for better understanding the above code. You need to use it with root permissions for mainly converting the keras model to CoreML model. Initialise the jupyter notebook instance with the following command:

(coreml) $ jupyter notebook --allow-root

Tutorial

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

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

Author

Sri Raghu Malireddi / @r4ghu

You can’t perform that action at this time.