A Convolutional Neural Network trained on the MNIST dataset to recognize handwritten digits (0–9). This project is created for learning purposes.
Note: The
cnn-digit-recognition-tf-v1 is an updated version with improved preprocessing, and a better model architecure.
Model Details
Model: Convolutional Neural Network (CNN)
Framework: TensorFlow/keras
Input: 28x28 grayscale images (shape: 28,28,1)
Output: Predicted digit (0-9)
Architecture:
- Conv2D (32 filters, 3x3, ReLU)
- MaxPooling2D (2x2)
- Conv2D (72 filters, 3x3, ReLU)
- MaxPooling2D (2x2)
- Conv2D (128 filters, 3x3, ReLU)
- MaxPooling2D (2x2)
- Flatten
- Dense (64 units, ReLU)
- Dense (10 units, Softmax)
Training:
- Dataset: MNIST
- Epochs: 5
- Loss: Sparse Categorical Crossentropy
- Optimizer: Adam
- Validation accuracy: ~98%
Purpose:
- learning and experimentation.
Model Description
This model is a Convolutional Neural Network trained on the MNIST dataset to recognize handwritten digits (0–9).
It was created as a learning project to explore deep learning concepts, convolutional architectures, and TensorFlow/Keras.
The Neural network consists of multiple convolutional and pooling layers, followed by dense layers.
Predictions on custom handwritten digits may fluctuate due to differences in handwriting styles.
- Model type: Convolutional Neural Network
- License: MIT
- Implemented by: Aman
Uses
This model is intended for experimentation, learning, and exploration of digit recognition.
It reflects the creator’s current understanding and may contain design limitations.
Direct Use
This model is intended for standalone use as a demonstration of CNN based handwritten digit recognition.
It is designed for experimentation, learning, and testing with MNIST pattern images.
The model is not intended for integration into production systems or larger applications.
Bias, Risks, and Limitations
Technical Limitations:
- The model is trained exclusively on the MNIST dataset, which contains of centered, grayscale, 28x28 pixel images.
- It may not predict well on handwriting styles, sizes, orientations, or backgrounds not represented in MNIST.
Sociotechnical Considerations:
- This model is intended solely for educational and experimental purposes.
Recommendations
This model is made just for learning and experimentation purposes, it is not a production-ready system.
It is recommended to use images that are preprocessed to match the MNIST format (28×28 pixels, grayscale) to improve prediction accuracy.
Users should not rely on the model for critical applications or decision-making tasks, and should be aware of its limited generalization to non-MNIST handwriting styles.