All Projects → cafielo → Mnistkit

cafielo / Mnistkit

Licence: mit
The better way to deal with MNIST model and Core ML in iOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Mnistkit

Iowncode
A curated collection of iOS, ML, AR resources sprinkled with some UI additions
Stars: ✭ 499 (+2276.19%)
Mutual labels:  coreml
Awesome Ml Demos With Ios
The challenge projects for Inferencing machine learning models on iOS
Stars: ✭ 741 (+3428.57%)
Mutual labels:  coreml
Shapedetector keras coreml
Deep learning installed Shape Detector using Keras and CoreML 📱
Stars: ✭ 25 (+19.05%)
Mutual labels:  coreml
Keras Openface
Keras-OpenFace is a project converting OpenFace from Torch implementation to a Keras version
Stars: ✭ 538 (+2461.9%)
Mutual labels:  coreml
Pinto model zoo
A repository that shares tuning results of trained models generated by TensorFlow / Keras. Post-training quantization (Weight Quantization, Integer Quantization, Full Integer Quantization, Float16 Quantization), Quantization-aware training. TensorFlow Lite. OpenVINO. CoreML. TensorFlow.js. TF-TRT. MediaPipe. ONNX. [.tflite,.h5,.pb,saved_model,tfjs,tftrt,mlmodel,.xml/.bin, .onnx]
Stars: ✭ 634 (+2919.05%)
Mutual labels:  coreml
Lumina
A camera designed in Swift for easily integrating CoreML models - as well as image streaming, QR/Barcode detection, and many other features
Stars: ✭ 784 (+3633.33%)
Mutual labels:  coreml
Torch2coreml
Torch7 -> CoreML
Stars: ✭ 363 (+1628.57%)
Mutual labels:  coreml
Coremlimage
A demo of creating your own CoreML model
Stars: ✭ 13 (-38.1%)
Mutual labels:  coreml
Windows Machine Learning
Samples and Tools for Windows ML.
Stars: ✭ 663 (+3057.14%)
Mutual labels:  coreml
Har Keras Coreml
Human Activity Recognition (HAR) with Keras and CoreML
Stars: ✭ 23 (+9.52%)
Mutual labels:  coreml
Awesome Coreml Models
Largest list of models for Core ML (for iOS 11+)
Stars: ✭ 5,192 (+24623.81%)
Mutual labels:  coreml
Mobile Semantic Segmentation
Real-Time Semantic Segmentation in Mobile device
Stars: ✭ 630 (+2900%)
Mutual labels:  coreml
Coremlhelpers
Types and functions that make it a little easier to work with Core ML in Swift.
Stars: ✭ 823 (+3819.05%)
Mutual labels:  coreml
Awesome Coreml Models
Collection of models for Core ML
Stars: ✭ 500 (+2280.95%)
Mutual labels:  coreml
Liooon Not A Liooon Classifier
A troll app to check if an object seen by your camera is a lion. Uses iOS CoreML, Vision APIs
Stars: ✭ 11 (-47.62%)
Mutual labels:  coreml
Seefood
Inspired by HBO's Silicon Valley: SeeFood is an iOS app that uses CoreML to detect various dishes
Stars: ✭ 445 (+2019.05%)
Mutual labels:  coreml
Facerecognition In Arkit
Detects faces using the Vision-API and runs the extracted face through a CoreML-model to identiy the specific persons.
Stars: ✭ 768 (+3557.14%)
Mutual labels:  coreml
Yolov3
YOLOv3 in PyTorch > ONNX > CoreML > TFLite
Stars: ✭ 8,159 (+38752.38%)
Mutual labels:  coreml
Objectclassifier
An iOS swift app that detects objects using machine learning (CoreML, Vision)
Stars: ✭ 12 (-42.86%)
Mutual labels:  coreml
Build Ocr
Build an OCR for iOS apps
Stars: ✭ 17 (-19.05%)
Mutual labels:  coreml

256_mnistkit

MNISTKit

MNISTKit makes it easy to deal with MNIST model.

MNISTKit is a library for digit detection with coreml model. The rise of A.I. is grounded in the success of deep learning. The “hello world” for deep learning is the MNIST model for handwritten digit recognition.

Carthage compatible Version License Xcode 9.0+ iOS 11.0+ Swift 4.0+

mnist

  1. Long way to use CoreML
  2. Requirements
  3. Installation
  4. Usage
  5. Credits
  6. License

Long way to use CoreML

There are some works to implement MNIST with CoreML Framework

  • Build a model
  • Convert to mlmodel
  • Make a hand writable UIView
  • Convert hand writable view to image and resize it
  • Get pixelbuffers from resized image
  • Predict the image with mlmodel using pixelbuffer

MNISTKit makes it easy to deal with MNIST model.

Requirements

  • iOS 11.0+
  • Xcode 9.0+
  • Swift 4.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate MNISTKit into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'MNISTKit'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Windless into your Xcode project using Carthage, specify it in your Cartfile:

github "cafielo/MNISTKit"

Run carthage update to build the framework and drag the built MNISTKit.framework into your Xcode project.

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate MNISTKit into your project manually.


Usage

  1. Drag a UIView the desired size of your player onto your Storyboard.
  2. Change the UIView's class in the Identity Inspector tab to MNISTDrawingView.
  3. Import MNISTKit in your ViewController.
  4. Add the following property to your ViewController.
    @IBOutlet weak var drawingView: MNISTDrawingView!
  1. Creat a MNISTModelController to predict later.
let mnistModelController = MNISTModelController()
  1. Detect hand written digit using MNISTModelController and MNISTDrawingView.
@IBAction func predict(_ sender: UIButton) {
        
        guard let image = drawingView.image else {
            return
        }
        
        guard let predictedNum = mnistModelController.predictNum(image: image) else {
            return
        }
        
        numLabel.text = "\(predictedNum) is predicted"
    }

Example

Following code is a simple example

import UIKit
import MNISTKit

class ViewController: UIViewController {
    @IBOutlet weak var drawingView: MNISTDrawingView!
    @IBOutlet weak var numLabel: UILabel!
    let mnistModelController = MNISTModelController()
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    @IBAction func predict(_ sender: UIButton) {
        
        guard let image = drawingView.image else {
            return
        }
        
        guard let predictedNum = mnistModelController.predictNum(image: image) else {
            return
        }
        
        numLabel.text = "\(predictedNum) is predicted"
    }
    
    @IBAction func clear(_ sender: UIButton) {
        drawingView.clear()
        numLabel.text = "???"
    }
}

Credits

License

MNISTKit is released under the MIT license. See LICENSE for details.

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].