This project aims to classify handwritten digits from the MNIST dataset using a neural network built with TensorFlow and Keras. The MNIST dataset is a commonly used benchmark dataset in machine learning for digit recognition tasks.
The project utilizes a neural network architecture to classify handwritten digits from the MNIST dataset. It preprocesses the data, builds and trains the model, evaluates its performance, and saves the trained model for future use.
Ensure you have the following dependencies installed:
- Python (>=3.6)
- TensorFlow
- Keras
- Matplotlib
- Seaborn
- NumPy
- scikit-learn
- OpenCV (cv2)
- Google Colab (if using)
You can install the required packages using pip:
pip install tensorflow keras matplotlib seaborn numpy scikit-learn opencv-python-headless
The neural network model architecture consists of:
- Input layer: Flattened input images (28x28 pixels)
- Hidden layers: Fully connected layers with ReLU activation
- Output layer: Softmax activation for multiclass classification (10 output classes)
The model is trained using the MNIST dataset, with 10 epochs and a batch size of 32. Training loss and accuracy are monitored during the training process.
After training, the model's performance is evaluated using the test dataset. Classification report and confusion matrix are generated to assess the model's accuracy and performance.
The project achieves an accuracy of 98% on the test dataset.
The trained model is saved using joblib for future use. You can load the model and make predictions on new data.