Git Product home page Git Product logo

image-classification-mnist-emnist-letters's Introduction

Image Classification on MNIST and EMNIST Letters

The project is to train a deep neural network to classify images on MNIST and EMNIST datasets.

Summary of Accuracy on MNIST

  • training accuracy: 99.92%
  • validation accuracy: 99.60%
  • test accuracy: 99.48%

Summary of Accuracy on EMNIST

  • training accuracy: 98.7%
  • validation accuracy: 95.1%
  • test accuracy: 94.9%

Environment and Run Jupyter Notebook

  • Tensorflow
  • Keras
  • Sklearn
  • scipy
  • numpy
  • cv2
  • matplotlib

run "image-classification-mnist-emist.ipynb"

Vanishing Gradient Problem

When training the neural network, during the backpropogation in each subsequent layer, the gradient in earlier layers get exponientially smaller and smaller (vanishing), which makes the network learning very little/slow to improve.

Potential Solutions include:

  • Batch normalization, which is to normalize the activations of the previous layer at each batch, i.e. applies a transformation that maintains the mean activation close to 0 and the activation standard deviation close to 1 to reduce the oscillations of in the distribution of activation. Deep network can be trained faster and better when the activation is normalized during backpropogation.
  • Use ReLu activation will normally solve the vanishing gradient problem (not sigmoid).
  • Using Regularization to modify cost function to penalize larger weights.
  • Use different weight initialization, mementum, etc.
  • Use more data.
  • Modify architecture.

References

image-classification-mnist-emnist-letters's People

Contributors

zmandyhe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

image-classification-mnist-emnist-letters's Issues

How can we test MNIST/EMNIST Saved Models (emnist_v7.h5)

@zmandyhe Thanks for the code. However, your EMNIST dataset has 26 classes only where the original EMNIST has 47 classes.

How can we test the saved model (emnist_v7.h5) on an image containing handwritten text? I am trying to recognize 2x + 3y = 10 (handwritten equation).

I find contours and draw rectangles on the image to extract characters. But the prediction is totally wrong when predicting letters with your provide saved model (emnist_v7.h5).

Any help you can provide? or just guide toward some article / tutorial that I can follow.

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.