Predict handwritten digits with CoreML

Overview

MNIST for CoreML (CNN)

Description

This is the MNIST dataset implemented in Apple's new framework CoreML. The MNIST dataset can predict handwritten (drawn) digits from an image and outputs a prediction from 0-9. The model was built with Keras 1.2.2.

To test this model you can open the MNISTPrediction.xcodeproj and run it on your device (iOS 11 and Xcode 9 is required). To test further images just add them to the project and replace my testing with yours.

An example of a handdrawn digit would look like this: Digit 4

Be aware that your images have to have a black background and white line color!

Furthermore your images resolution has to be 28x28px. If yours is bigger just use my UIImage rescaling extension I wrote. The line width has to be thick enough to be recognized as a digit.

Information about the model

This CNN model achieves up to 99.5% of accuracy and the structure is as follows:

CNN Model

You might also like...
An iOS app to turn typed text into images of handwritten text in your own handwriting style.
An iOS app to turn typed text into images of handwritten text in your own handwriting style.

Text-to-Handwritting © 2021 by Daniel Christopher Long An iOS app to turn typed text into images of handwritten text in your own handwriting style. ht

DeepInfant® is a Neural network system designed to predict whether and why your baby is crying.
DeepInfant® is a Neural network system designed to predict whether and why your baby is crying.

DeepInfant DeepInfant® is a Neural network system designed to predict whether and why your baby is crying. DeepInfant uses artificial intelligence and

CoreML-Face-Parsing - how to use face-parsing CoreML model in iOS
CoreML-Face-Parsing - how to use face-parsing CoreML model in iOS

CoreML-Face-Parsing The simple sample how to use face-parsing CoreML model in iO

iOS app that detects LaTeX symbols from drawings. Built using PencilKit, SwiftUI, Combine and CoreML for iOS 14 and macOS 11.

DeTeXt Finding the symbol you want to use in LaTeX can be hard since you can't memorize all the possible commands and packages for every symbol you mi

Discover, download, compile & launch different image processing & style transfer CoreML models on iOS.
Discover, download, compile & launch different image processing & style transfer CoreML models on iOS.

⚠️ ⚠️ ⚠️ IMPORTANT: I'm no longer maintaining Awesome-ML. Awesome ML is an iOS app that is made to demonstrate different image processing CoreML model

Memory leak when CoreML ML Program is runing on GPU

MLProgramMemoryLeak Every layer running on the GPU in ML Program will leak 912 bytes by MPSGraphEngine. This can easily lead to 200KB+ memory leak eve

Real-Time image recognition for iOS with Vision(CoreML) and InceptionV3
Real-Time image recognition for iOS with Vision(CoreML) and InceptionV3

Kesan-ML-iOS Real-Time image recognition for iOS with CoreML and InceptionV3  Test Flight Description Real-Time image recognition Integrating app wit

Inspired by HBO's Silicon Valley: SeeFood is an iOS app that uses CoreML to detect various dishes
Inspired by HBO's Silicon Valley: SeeFood is an iOS app that uses CoreML to detect various dishes

SeeFood For a step by step guide on how to build SeeFood: How to train your own model for CoreML. . Video Demo Follw me on Twitter Prerequisites: Xcod

A camera designed in Swift for easily integrating CoreML models - as well as image streaming, QR/Barcode detection, and many other features
A camera designed in Swift for easily integrating CoreML models - as well as image streaming, QR/Barcode detection, and many other features

Would you like to use a fully-functional camera in an iOS application in seconds? Would you like to do CoreML image recognition in just a few more sec

Coreml-performance project works on MacOS to test M1 macbooks

ml-macos-performance This project is inspired by Vladimir Chernykh coreml-performance project for iOS. I made changes so it works on MacOS to test M1

A Swift library for creating and exporting CoreML Models in Swift

SwiftCoreMLTools A Swift Library for creating CoreML models in Swift. Work in progress This library expose a (function builder based) DSL as well as a

Style Art library process images using COREML with a set of pre trained machine learning models and convert them to Art style.
Style Art library process images using COREML with a set of pre trained machine learning models and convert them to Art style.

StyleArt Style Art is a library that process images using COREML with a set of pre trained machine learning models and convert them to Art style. Prev

PyTorch to CoreML: Writing custom layers with Metal
PyTorch to CoreML: Writing custom layers with Metal

pytorch-coreml-custom-layer-example PyTorch to CoreML: Writing custom layers with Metal Convert PyTorch model cd Convert python3 -m pip install -r req

Coreml createml tutorial for you

https://www.youtube.com/watch?v=x9_BG2q7XYw&t=4258s // CreateML = Makes Model // CoreML = Consumes Model import CreateML import Foundation // Load

Awesome-ML - Discover, download, compile & launch different image processing & style transfer CoreML models on iOS.
Awesome-ML - Discover, download, compile & launch different image processing & style transfer CoreML models on iOS.

⚠️ ⚠️ ⚠️ IMPORTANT: I'm no longer maintaining Awesome-ML. Awesome ML is an iOS app that is made to demonstrate different image processing CoreML model

WhatPet - A basic app that classifies images of dogs, cats and rabbits using CoreML
WhatPet - A basic app that classifies images of dogs, cats and rabbits using CoreML

WhatPet ✓ A basic app that classifies images of dogs, cats and rabbits using Cor

CoreMLSample - CoreML Example for in app model and download model

CoreMLSample Sample for CoreML This project is CoreML Example for in app model a

Converted CoreML Model Zoo.
Converted CoreML Model Zoo.

CoreML-Models Converted CoreML Model Zoo. CoreML is a machine learning framework by Apple. If you are iOS developer, you can easly use machine learnin

 Convert Torch7 models into Apple CoreML format
Convert Torch7 models into Apple CoreML format

Convert Torch7 models into Apple CoreML format. Short tutorial This tool helps convert Torch7 models into Apple CoreML format which can then be run on

Comments
Owner
Philipp Gabriel
swift - mobile dev - CoreML - wwdc 2k17 scholarship winner
Philipp Gabriel
PyTorch to CoreML: Writing custom layers with Metal

pytorch-coreml-custom-layer-example PyTorch to CoreML: Writing custom layers with Metal Convert PyTorch model cd Convert python3 -m pip install -r req

Aleksandr Ovechko 7 Sep 29, 2022
Converted CoreML Model Zoo.

CoreML-Models Converted CoreML Model Zoo. CoreML is a machine learning framework by Apple. If you are iOS developer, you can easly use machine learnin

MLBoy 483 Jan 5, 2023
Convert Torch7 models into Apple CoreML format

Convert Torch7 models into Apple CoreML format. Short tutorial This tool helps convert Torch7 models into Apple CoreML format which can then be run on

Prisma Labs 377 Nov 11, 2022
Holistically-Nested Edge Detection (HED) using CoreML and Swift

HED-CoreML Holistically-Nested Edge Detection (HED) using CoreML and Swift This is the repo for tutorial, that contains an example application that ru

Andrey Volodin 101 Dec 25, 2022
A CoreML models that detects nudity in a picture

Nudity Detection for CoreML Description This is the OpenNSFW dataset implemented in Apple's new framework called CoreML. The OpenNSFW dataset can pred

Philipp Gabriel 99 Oct 13, 2022
A CoreML model which classifies images of food

Food101 for CoreML Description This is the Food101 dataset implemented in Apple's new framework called CoreML. The Food101 dataset can predict foods f

Philipp Gabriel 133 Nov 17, 2022
The MobileNet neural network using Apple's new CoreML framework

MobileNet with CoreML This is the MobileNet neural network architecture from the paper MobileNets: Efficient Convolutional Neural Networks for Mobile

Matthijs Hollemans 698 Dec 4, 2022
TextDetection-CoreML - This project is Text Detection on iOS using Vision built-in model

This project is Text Detection on iOS using Vision built-in model. If you are interested in iOS + Machine Learning, visit here yo

tucan9389 61 Nov 17, 2022
ImageClassification - Usage The MobileNetv2 CoreML Model with StoryBoard

Image Classification with The MobileNetV2 MobileNetV2: Inverted Residuals and Li

Hamit SEYREK 0 Jun 25, 2022
Gloth - Generates a CoreML Word Tagger Model trained on interactive fiction commands

Gloth Gloth: Fold dough 83 times Generates a CoreML Word Tagger Model trained on

Chris Sessions 0 Feb 12, 2022