This project trains a Convolutional Neural Network (CNN) using the MNIST dataset to classify handwritten digits (0–9). The model is built and trained using TensorFlow & Keras.
- Loads and preprocesses MNIST dataset
- Deep CNN model for digit recognition
- Dropout for regularization
- Achieves high accuracy with just a few epochs
- Simple and beginner friendly code structure
- Includes sample predictions on test images
Make sure you have Python 3.7+ installed.
# Clone the repository
git clone https://github.com/<your-username>/<repo>.git
cd <repo>
# Install dependencies
pip install tensorflowRepo
├── digit_recog.ipynb # Main Jupyter Notebook
├── README.md # Project Documentation
└── CONTRIBUTING.md # Contributing Guidelines
📌 For contributing guidelines, refer to Contributing.md.
⭐️ Model Enhancements
- Add more CNN layers / different architecture (e.g., BatchNorm, Dropout tuning)
- Use different optimizers / learning rate schedulers
- Improve accuracy through data augmentation
- Add early stopping + checkpoint saving
⭐️ Code Improvements
- Modularize the script (split into train.py, model.py, utils.py)
- Add configuration support (YAML/JSON)
- Add argument parser (argparse) for flexibility
- Add documentation and inline comments
⭐️ Testing & Validation
- Write unit tests for data loading/model building
- Add validation metrics like confusion matrix, F1 score