GithubHelp home page GithubHelp logo

jedt / mnist-streamlit Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.6 MB

Machine learning Handwritten digit recognition using the MNIST database and Streamlit

License: MIT License

Python 5.48% Jupyter Notebook 94.52%
machine-learning mnist-classification pytorch streamlit

mnist-streamlit's Introduction

mnist-streamlit

Machine learning Handwritten digit recognition using the MNIST database and Streamlit

Introduction

According to Wikipedia, the MNIST stands for Modified National Institute of Standards and Technology database is a large database of handwritten digits that is commonly used for training various image processing systems. The MNIST database consists of 60,000 training images and 10,000 testing images, which are digits written by high school students and employees of the United States Census Bureau.

The dataset is considered the "hello, world" of machine learning. Each image is small, 28x28 pixels, and labeled according to its numeric representation. Streamlit is a Python library that lets anyone transform Python scripts into single-page web apps in just a few lines of code.

This project aims to train a model in Pytorch that would predict any user-drawn digits from their browser.

Features

Provided is the Jupyter Notebook training code for the digit classifier and a web app enabling the model to predict new user-drawn digits from the web app via HTML5 canvas.

The model is a convolutional neural network (CNN) and is specifically designed for image classification or, more precisely, for the MNIST dataset.

Getting Started

To be able to run the project, make sure Python 3.9 or later is installed and run:

pip install -r requirements.txt

To test the pre-trained classifier model included in the repo:

streamlit run app.py

To train a new model, open the jupyter notebook

jupyter notebook train_mnist.ipynb

Displaying screenshot-mnist.gif

Training accuracy results

Train Epoch: 70 	Average Loss: 0.006639	Accuracy: 99.76%
Train Epoch: 71 	Average Loss: 0.007192	Accuracy: 99.78%
Train Epoch: 72 	Average Loss: 0.005899	Accuracy: 99.81%
Train Epoch: 73 	Average Loss: 0.005731	Accuracy: 99.80%
Train Epoch: 74 	Average Loss: 0.005509	Accuracy: 99.80%
Train Epoch: 75 	Average Loss: 0.005899	Accuracy: 99.78%
Train Epoch: 76 	Average Loss: 0.005147	Accuracy: 99.82%
Train Epoch: 77 	Average Loss: 0.006637	Accuracy: 99.77%
Train Epoch: 78 	Average Loss: 0.005603	Accuracy: 99.81%
Train Epoch: 79 	Average Loss: 0.005901	Accuracy: 99.80%
Train Epoch: 80 	Average Loss: 0.005696	Accuracy: 99.80%

mnist-streamlit's People

Contributors

jedt avatar

Watchers

 avatar

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.