All Projects → hwchong → Mnist_draw

hwchong / Mnist_draw

This is a sample project demonstrating the use of Keras (Tensorflow) for the training of a MNIST model for handwriting recognition using CoreML on iOS 11 for inference.

Projects that are alternatives of or similar to Mnist draw

Ios Coreml Mnist
Real-time Number Recognition using Apple's CoreML 2.0 and MNIST -
Stars: ✭ 74 (-46.76%)
Mutual labels:  jupyter-notebook, coreml, mnist
Pytorch Mnist Vae
Stars: ✭ 32 (-76.98%)
Mutual labels:  jupyter-notebook, mnist
Mnist Ewc
Implementation of ews weight constraint mentioned in recent Deep Mind paper: http://www.pnas.org/content/early/2017/03/13/1611835114.full.pdf
Stars: ✭ 9 (-93.53%)
Mutual labels:  jupyter-notebook, mnist
Svhn Cnn
Google Street View House Number(SVHN) Dataset, and classifying them through CNN
Stars: ✭ 44 (-68.35%)
Mutual labels:  jupyter-notebook, mnist
Build Ocr
Build an OCR for iOS apps
Stars: ✭ 17 (-87.77%)
Mutual labels:  jupyter-notebook, coreml
Har Keras Coreml
Human Activity Recognition (HAR) with Keras and CoreML
Stars: ✭ 23 (-83.45%)
Mutual labels:  jupyter-notebook, coreml
Chineseidcardocr
[Deprecated] 🇨🇳中国二代身份证光学识别
Stars: ✭ 1,015 (+630.22%)
Mutual labels:  coreml, ios11
Awesome Coreml Models
Collection of models for Core ML
Stars: ✭ 500 (+259.71%)
Mutual labels:  coreml, ios11
Coreml Training
Source code for my blog post series "On-device training with Core ML"
Stars: ✭ 77 (-44.6%)
Mutual labels:  jupyter-notebook, coreml
Pytorch
PyTorch tutorials A to Z
Stars: ✭ 87 (-37.41%)
Mutual labels:  jupyter-notebook, mnist
Early Stopping Pytorch
Early stopping for PyTorch
Stars: ✭ 612 (+340.29%)
Mutual labels:  jupyter-notebook, mnist
Exermote
Using Machine Learning to predict the type of exercise from movement data
Stars: ✭ 108 (-22.3%)
Mutual labels:  coreml, ios11
Awesome Coreml Models
Largest list of models for Core ML (for iOS 11+)
Stars: ✭ 5,192 (+3635.25%)
Mutual labels:  coreml, ios11
Shapedetector keras coreml
Deep learning installed Shape Detector using Keras and CoreML 📱
Stars: ✭ 25 (-82.01%)
Mutual labels:  jupyter-notebook, coreml
Keras Openface
Keras-OpenFace is a project converting OpenFace from Torch implementation to a Keras version
Stars: ✭ 538 (+287.05%)
Mutual labels:  jupyter-notebook, coreml
Relativistic Average Gan Keras
The implementation of Relativistic average GAN with Keras
Stars: ✭ 36 (-74.1%)
Mutual labels:  jupyter-notebook, mnist
Medmnist
[ISBI'21] MedMNIST Classification Decathlon: A Lightweight AutoML Benchmark for Medical Image Analysis
Stars: ✭ 338 (+143.17%)
Mutual labels:  jupyter-notebook, mnist
Torch2coreml
Torch7 -> CoreML
Stars: ✭ 363 (+161.15%)
Mutual labels:  coreml, ios11
Deeplearning
Deep Learning From Scratch
Stars: ✭ 66 (-52.52%)
Mutual labels:  jupyter-notebook, mnist
Arkit Sampler
Code examples for ARKit.
Stars: ✭ 1,334 (+859.71%)
Mutual labels:  coreml, ios11

End to end model training and inference using Keras (Tensorflow) and CoreML.

This is a sample application that demonstrates the end-to-end process of training a custom model for digit recognition (MNIST) from scratch using Keras running on Tensorflow 1.1 as its backend and generating a CoreML model for inference on iOS 11.

Demo Gif

YouTube Video

Getting Started

The fastest way to get started is to install Docker for your machine.

Once Docker has been installed, either pull a pre-made Docker image Docker Hub:

$ docker pull hwchong/kerastraining4coreml

or build it in the Training folder in the repo:

$ cd Training
$ docker build -t 'inserttagname' .

To start the Jupyter Notebook server which will serve as your Python REPL and IDE execute the following command:

$ docker run -p 8888:8888 -p 6006:6006 hwchong/kerastraining4coreml

If using your own tag name, remember to subsitute hwchong/kerastraining4coreml with whatever you used to build your Docker Image

Remember to watch the Terminal to get the token required to sign into your Jupyter Notebook instance.

Training

Launching the Jupyter Notebook will present you with two notebooks. To start training a Deep Neural Network consisting of a Convolutional Neural Network, execute the Keras-1.2.2-mnist-cnn.ipynb file.

Running the training will take ~15 minutes on a MacBook Pro.

Conversion

Once model training has been completed, save the model file.

To generate a coremlmodel file, run the model conversion notebook Keras-CoreML.ipynb . Once you have this file, download it to and insert it into your Xcode project.

Deployment

Please refer the the Inference folder and the included MNIST_DRAW to see how to implement the custom generated Keras coremlmodel.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].