This project demonstrates the creation of a simple digit classification model using the MNIST dataset. The model uses TensorFlow and Keras for implementation, providing insights into preprocessing, training, and evaluating the dataset.
The MNIST dataset consists of handwritten digit images (0-9). It includes:
- Training Set: 60,000 samples
- Test Set: 10,000 samples
Each image is grayscale and has a size of 28x28 pixels.
- Data Normalization: Input pixel values are scaled to the range [0, 1].
- Visualization: Uses Matplotlib to display sample images.
- Deep Learning Model: Fully connected neural network using Keras and TensorFlow.
- Clone the repository:
git clone <repository-url> cd <repository-folder>
- Data Loading
keras.datasets.mnist.load_data() to fetch the MNIST dataset.
- Data Preprocessing:
Normalizes pixel values for faster convergence.
- Model Architecture:
Utilizes Dense and Flatten layers for classification.
- Visualization
Displays digit samples using Matplotlib.
- Run the script:
python main.py
- The model will:
- Load and preprocess the dataset.
- Train a neural network.
- Display a sample image.
- Evaluate performance on the test set.
- Add CNN layers for better accuracy.
- Experiment with data augmentation techniques.
- Implement deployment using FastAPI.