Handwritten Digit Recognition
This project uses a convolutional neural network to recognize handwritten digits from the MNIST dataset. The model is trained on thousands of images to achieve high accuracy in classifying digits from 0 to 9.
_
Here are some of the details of the project:
-
Dataset
The MNIST dataset is a collection of 70,000 handwritten digits (0-9) commonly used for training and testing machine learning models. Each image is a grayscale image with a resolution of 28x28 pixels.
Dataset Split
Dataset Number of Images Training Set 60,000 Testing Set 10,000 Sample Images
Here are 10 sample images from the MNIST dataset: -
Model
The model is a convolutional neural network (CNN) designed to recognize handwritten digits from the MNIST dataset. By leveraging convolutional layers, pooling layers, and dense layers, the model can capture intricate patterns and features in the images to make accurate predictions.
Technologies Used
Technology Description Python A high-level programming language used for data analysis and model development. Numpy A numerical computing library used for handling arrays and matrices. TensorFlow An open-source machine learning library used for building and training deep learning models. Matplotlib A plotting library used for visualizing data and model performance. Model Architecture
- Model Type: Sequential Neural Network.
- Total Parameters: 101,770 (397.54 KB).
- Trainable Parameters: 101,770 (397.54 KB).
- Non-trainable Parameters: 0 (0.00 B).
Layer (type) Output Shape Param # Input (Flatten) (None, 784) 0 Hidden (Dense) (None, 128) 100,480 Output (Dense) (None, 10) 1,290 Training Configuration
Optimizer Loss Function Metrics Adam Categorical Crossentropy Accuracy -
Training
The model is trained on the training set of the dataset using an optimization algorithm such as Adam. By iteratively updating the model's weights and biases, the model learns to recognize patterns and features in the images, improving its accuracy over time.
Training Results
The training results show the model's accuracy and loss over the training epochs. The model achieves high accuracy on the training set, indicating that it has learned to recognize handwritten digits effectively. -
Testing
The model's performance is assessed on a testing set comprising 10,000 images, offering a robust evaluation of its ability to generalize and accurately recognize unseen handwritten digits. Achieving a test accuracy of approximately 96.26%, the model showcases exceptional proficiency in digit recognition, highlighting its reliability and effectiveness in tackling real-world scenarios.
Testing Results
The model made a total of 280 incorrect predictions on the testing set, indicating areas for potential improvement. By analyzing these misclassifications, we can identify patterns and optimize the model to enhance its accuracy and performance further. -
Results
The model successfully recognizes handwritten digits from the MNIST dataset with high accuracy. By leveraging convolutional neural networks, the model can capture intricate patterns and features in the images to make accurate predictions.
Results Visualization
Upon reviewing the results, we can observe that there might be some inaccuracies. This could be due to various factors such as the quality of the input images, the complexity of the handwritten digits, or limitations in the model's training. It is important to consider these factors when interpreting the results.