Handwritten text recognition system implemented with TensorFlow and trained on the the MNIST database of handwritten digits. This Neural Network model will recognise a single letter or word contained in the image. We will be using Python3, numpy, TensorFlow 2.3 and OpenCV. Here's a web-based application built to allow an user to upload an image of a handwritten digit or draw them in the app itself and get a prediction by the model as to what he/she has entered.
These are the basic steps:
- Load data from the mnist dataset
- Normalize the data
- Create the model and add layers
- Compile the model and train it.
- Evaluate the loss and accuracy and print the same
- Save the model
- Load the input image
- Invert the image(white becomes black and vice versa)
- Model will predict on test data
- Display the output (in grayscale)
-
Cloning the Repository:
git clone https://github.com/devanshpratapsingh/Handwritten-text-recognition
-
Setting up the Python Environment with the dependencies:
pip install -r requirements.txt
-
Running the Web App:
streamlit run main.py
-
Stopping the web app from the terminal:
Ctrl+C