Handwritten digit recognition is the ability of a computer to recognize the human handwritten digits from different sources like images, papers, touch screens, etc, and classify them into 10 predefined classes (0-9).
The Program is written using the Python Programming Language. It uses the following Python Libraries:
- Tensorflow
- Numpy
- OS
- Open Cv (cv2)
- Matplotlib
Please Follow the following steps to run the program without error:
- First Check if all the modules or libraries are installed. If not run the following command
pip install tensorflow numpy opencv-python matplotlib
- Once all the Libraries or Modules are Installed run the following command. This will train and creae the model and will save it
python .\model.py
- Once the Model is created, run the main program.
python .\main.py
Note: The Pics folder contains 85 hand written images which are of 28x28 pixels in size. If you want to use your own pictures you can add it in the Pics folder but make sure it is 28x28 pixels in size.
The Model has 3 Layers. They are as follows:
- Flatten Layer
- Dense Layer
- Dense Layer
The Summary Table is given below
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
flatten (Flatten) (None, 784) 0
dense (Dense) (None, 128) 100480
dense_1 (Dense) (None, 10) 1290
=================================================================
Total params: 101,770
Trainable params: 101,770
Non-trainable params: 0
_________________________________________________________________
If you are running a device with 32 bit architecture or a device with less RAM you can use the Google Colab or Google Colabtory because while training the model, it will consume over 80% of you CPU and RAM.