This project implements a Convolutional Neural Network (CNN) to accurately classify handwritten digits using the MNIST dataset. The model is designed to efficiently analyze and process visual data, leveraging advanced algorithms and image processing techniques to identify and predict numbers within images.
- Source: Kaggle - Digit Recognizer
- Description: The dataset consists of 28x28 grayscale images of handwritten digits (0-9). Each image is labeled with the correct digit it represents.
Develop a deep learning model capable of classifying handwritten digits with high accuracy, utilizing the MNIST dataset for training and evaluation.
-
Normalized pixel values to the range [0, 1].
-
Reshaped images to include a single channel for compatibility with CNN input requirements.
-
Converted labels to one-hot encoded vectors for multiclass classification.
-
Input Layer: Accepts 28x28x1 input images.
-
Convolutional Layers: Extract features using filters and activation functions.
-
Pooling Layers: Reduce spatial dimensions to minimize overfitting.
-
Fully Connected Layers: Interpret features and output probabilities for each class.
-
Output Layer: Uses softmax activation to produce a probability distribution over the 10 digit classes.
-
Compiled the model with categorical cross-entropy loss and the Adam optimizer.
-
Trained the model over multiple epochs with a defined batch size.
-
Validated the model on a separate validation set to monitor performance.
-
Assessed model accuracy on the test dataset.
-
Analyzed confusion matrix to identify misclassifications.
-
Evaluated precision, recall, and F1-score for each class.
-
Test Accuracy: Achieved high accuracy on the test set, demonstrating the model's effectiveness in digit classification tasks.
-
Python 3.
-
TensorFlow
-
Keras
-
NumPy
-
Matplotlib
Note: Install the dependencies using the following command:
-
Implement data augmentation techniques to improve model robustness.
-
Explore deeper CNN architectures for potentially higher accuracy.
-
Deploy the model using a web framework like Flask or Streamlit for real-time digit recognition.