This project implements a neural network using TensorFlow and Keras to recognize handwritten digits from the MNIST dataset. The model can also predict custom handwritten digit images.
- Customizable Neural Network: Dynamically set the number of layers, neurons, activation functions, and epochs.
- Data Augmentation: Increases the training dataset using techniques like rotation, shifting, and zooming to improve generalization.
- Custom Predictions: Load your custom digit images and let the model predict them.
- Model Saving and Loading: Train a new model or load an existing one.
- Python 3.x
- TensorFlow
- NumPy
- OpenCV
- Matplotlib
Install the required libraries with:
pip install tensorflow numpy opencv-python matplotlib
Note for Linux users: It is recommended to create a virtual environment to install these libraries, as direct pip installation may lead to system-wide conflicts. Use the following commands to set up a virtual environment:
python3 -m venv digit_eye_env
source digit_eye_env/bin/activate
pip install tensorflow numpy opencv-python matplotlib
- Clone the repository
git clone https://github.com/AleksaVukadinovic/DigitEye
cd DigitEye
- Run the script
python digit_recognition.py
- Follow the console prompts
This project draws inspiration from and builds upon the following resources:
-
DeepLearning Series by 3Blue1Brown
An excellent visual introduction to the concepts behind neural networks and deep learning. -
Handwritten Digit Recognition by NeuralNine
A practical guide to implementing a digit recognition system. -
Veštačka inteligencija (Artificial Intelligence)
A comprehensive textbook by Mladen Nikolić and Predrag Janičić, providing theoretical insights into artificial intelligence. -
Using Neural Networks to Recognize Digits
A detailed article explaining the mathematics and algorithms behind digit recognition using neural networks.