Code Monkey home page Code Monkey logo

hand-written-digits-recognition-web-app's Introduction

Handwritten Digits Recognition Web App

Handwritten Digits Recognition Web App, as you might have already guessed, is a web app where one can play around(once it's is deployed) and let a Machine Learning model(instead of using a pretrained model from the internet, I coded one from scratch with test accuracy of 98%) recognize the digit that's written.

For the frontend, I used React.js with the Axios library to take care of the http request/response in the frontend and for the backend, I used Django Rest Framework. I built the classifier with PyTorch.

For the time being, the app works like a charm only in my local instance. I have planned to incorporate some more things(see todo section) before I deploy it to the cloud. I'll link all the resources that helped me, down below.

Installation

  1. Clone the repository and go to the directory
  2. Install the node modules
cd draw-app
npm install
  1. Install pip dependencies
pip install -r requirements.txt

Stacks

  • Frontend - React.js
  • Backend - Django Rest Framework
  • Classifier - PyTorch

Usage

  1. Start the servers
    • To start the frontend server
    cd draw-app
    npm start
    
    • To start the backend server
    cd backend
    python manage.py runserver
    
  2. Playing around with the MNIST classifier
    • To train the model
    cd classifier
    python train.py
    
    • To run the prediction
    cd classifier
    python predict.py
    

Model Architecture

Architecture

Demo

Demo

Contributing

Pull requests are welcome. If you have any inkling of how to accomplish the missions in the todo section, you have my attention.

Resources

  1. Project idea and reference - This amazing playlist by Pyplane
  2. MNIST dataset - The MNIST Database
  3. Loading the images and labels from idx.ubyte.gz file - This stack overflow answer
  4. PyTorch Implementation - PyTorch Deep Learning Hands-On: Build CNNs, RNNs, GANs, reinforcement learning, and more, quickly and easily by Sherin Thomas and Sudhanshu Passi
  5. PyTorch DataLoader, setting up training and prediction - PyTorch's comprehensive, well-written documentation
  6. Django design principles - Django Philosophy
  7. Sketching board react component - react-sketch
  8. React Hooks - react.js documentation
  9. Generate LeNet style model architecture image online - This web app

License

MIT

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.