Git Product home page Git Product logo

mnist-coreml's Introduction

MNIST + CoreML

Simple convolutional neural network to predict handwritten digits using Keras + CoreML built for WWDC '18 scholarship submission [Accepted]

MNIST + CoreML

What is a Convolutional Neural Network ? ๐Ÿค”

โ€œA convolutional neural network is a class of deep, feed-forward artificial neural networks that have successfully been applied to analyzing visual imagery.

They were inspired by biological processes in that the connectivity pattern between neurons resembles the organization of the animal visual cortex. Individual cortical neurons respond to stimuli only in a restricted region of the visual field known as the receptive field. The receptive fields of different neurons partially overlap such that they cover the entire visual field.โ€

โ˜๏ธ From Wikipedia


CONVNet simulation

โ˜๏ธ Watch the full video on YouTube by Denis Dmitriev


The MNIST Dataset โœ๏ธ

The MNIST database is arguably the most famous database in the field of machine learning; it is a large database of 28x28 pixel images of handwritten digits created in 1999 by Yann LeCun.


The Model ๐Ÿ’ป

Our model consists of 12 layers:

  1. Input (28x28 pixel image)
  2. Conv2D (Relu activation)
  3. MaxPooling2D
  4. Conv2D (Relu activation)
  5. MaxPooling2D
  6. Conv2D (Relu activation)
  7. MaxPooling2D
  8. Dropout (0.3)
  9. Flatten
  10. Dense
  11. Dropout (0.4)
  12. Dense (Softmax activation)

COVNet Model Visualization


Draw and classify digits in Playground Canvas ๐ŸŽจ

Run the MNIST+CoreML.playground on Xcode 9.0+ or Swift Playground app on the iPad

Make sure disable Enable Results before running

EnableResults


Creating and Training The Model ๐Ÿ‘ฉโ€๐Ÿซ

The model was created and trained using Keras (a high-level neural networks API, written in Python)

โ˜๏ธ Run the Jupyter notebook to train the network on your own device ๐Ÿ’ฏ


Converting to CoreML ๐Ÿง™โ€

Core ML is a framework introduced by Apple at WWDC '17 to integrate machine learning models into iOS, tvOS, macOS and watchOS apps.

The coremltools python package makes it very easy to generate the .mlmodel file, then all you need to do is just drag and drop that file into your Xcode project and you're all set ๐Ÿ˜Ž


Credits and Thanks ๐Ÿ™


Contributing

Your feedback is always appreciated and welcomed. If you find a bug in the source code, you can help me by submitting an issue. Even better you can submit a Pull Request with a fix :)


License ๐Ÿ‘จโ€โš–๏ธ

This project is released under the MIT License

mnist-coreml's People

Contributors

omaralbeik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mnist-coreml's Issues

Help needed for adding camera view

Hi Omar,
Great repo indeed. However, I want to include a camera view in the area located here:
image

Can you point me to the correct resource so that I add an option to include a camera feed and gallery view?

Thanks
Arijit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.