This project explores the power of neural networks in image classification, specifically for recognizing handwritten digits from the MNIST dataset. Starting with a simple dense neural network, we then move to Convolutional Neural Networks (CNNs) to leverage their advanced capability in processing spatial information, significantly improving accuracy.
- Introduction: Background on neural networks and the motivation for using CNNs for image data.
- Data Preprocessing: Loading, normalizing, and reshaping the data to prepare for neural network training.
- Model Development:
- Baseline model using a dense neural network.
- Advanced model using a CNN for improved feature extraction and classification.
- Training and Evaluation: Training models and comparing results, with the CNN achieving an impressive 0.99514 accuracy score on Kaggle.
- Best Model: Convolutional Neural Network (CNN)
- Score: The final model achieved a score of 0.99514 on the Kaggle "Digit Recognizer" competition leaderboard.
- Python 3.x
- Libraries: TensorFlow, Keras, NumPy, Matplotlib, etc.
- Clone the repository.
- Download the dataset from Kaggle.
- Save the downloaded file in the same directory as the Jupyter Notebook.
- Install the necessary libraries:
pip install tensorflow keras numpy pandas matplotlib scikit-learn
- Run the notebook to view model training and evaluation.
This project was created as an exercise in deep learning with a focus on image recognition tasks. Special thanks to the Kaggle community and MNIST dataset creators.