Skip to content

Dang-ctrl/MSA-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MNIST Digit Classifier

A simple project that uses a neural network to recognize handwritten digits (0–9) from the MNIST dataset.
It demonstrates the basic workflow of computer vision: dataset preparation, preprocessing, model building, training, evaluation, and visualization.

Project Overview

  1. Dataset: MNIST handwritten digit images (28x28 pixels).
  2. Preprocessing: Images converted into tensors.
  3. Model: A simple feedforward neural network with one hidden layer.
  4. Training: Model learns patterns from digits over a few epochs.
  5. Evaluation: Achieves about 95% accuracy.
  6. Visualization: Training loss and accuracy are plotted in results.png.

Project Structure

mnist-digit-classifier/ │── main.py # Main code (model, training, evaluation) │── requirements.txt # Dependencies │── README.md # Project documentation │── results.png # Training loss and accuracy graph

bash Copy code

Getting Started

1. Clone the repository

git clone https://github.com/your-username/mnist-digit-classifier.git
cd mnist-digit-classifier
2. Create a virtual environment (optional but recommended)
bash
Copy code
python -m venv venv
source venv/bin/activate   # Mac/Linux
venv\Scripts\activate      # Windows
3. Install dependencies
bash
Copy code
pip install -r requirements.txt
4. Run the project
bash
Copy code
python main.py
Results
Training accuracy reaches about 95% in just 3 epochs.

Example training curves are saved in results.png.

Learning Outcomes
How datasets and preprocessing work in AI

Basics of neural networks (input → hidden → output layers)

Training and evaluation with PyTorch

Visualizing performance using graphs

Future Improvements
Use a Convolutional Neural Network (CNN) for higher accuracy (~99%)

Deploy as a simple web app using Flask or Streamlit

Add a feature to draw custom digits and test them

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages