Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 2.12 KB

File metadata and controls

60 lines (50 loc) · 2.12 KB

Handwritten Digits Identification Using Neural Network

This project demonstrates the use of a neural network to identify handwritten digits from the MNIST dataset. The neural network is trained on a large set of handwritten digits and learns to classify each digit (0-9) based on the pixel values of the images.

Features

  • Data preprocessing and normalization
  • Neural network model creation using Keras
  • Model training and evaluation
  • Prediction on new handwritten digit images
  • Visualization of training results and predictions

Requirements

  • Python 3.x
  • TensorFlow 2.x
  • Keras
  • NumPy
  • Matplotlib
  • Jupyter Notebook (optional for interactive use)

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/handwritten-digits-identification.git
    cd handwritten-digits-identification
  2. Create a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required packages:
    pip install -r requirements.txt

Usage

Data Preparation

  1. The MNIST dataset is automatically downloaded using Keras. The dataset consists of 60,000 training images and 10,000 test images of 28x28 pixels.
  2. Preprocess the data:
    • Normalize the pixel values to the range [0, 1].
    • Reshape the data to fit the model input.

Model Training

  1. Define the neural network architecture using Keras Sequential API.
  2. Compile the model with an appropriate optimizer, loss function, and metrics.
  3. Train the model on the training data and validate on the test data.

Prediction

  1. Use the trained model to make predictions on new images.
  2. Evaluate the model's performance using accuracy and other metrics.

Visualization

  1. Plot the training and validation accuracy/loss over epochs.
  2. Display sample predictions with the actual labels.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any enhancements or bug fixes.

Licenses

This project is licensed under the MIT License. See the LICENSE file for details.