GitHunt
AL

aloksharma3/mnist-3-vs-7-classifier

Binary classification of MNIST digits 3 and 7 using PyTorch

MNIST 3 vs 7 Digit Classifier

This project focuses on classifying handwritten digits 3 and 7 from the MNIST dataset using a neural network. It's a minimal example of binary classification using PyTorch and the popular MNIST dataset.

๐Ÿ“Œ Features

  • Downloads and filters MNIST data for digits 3 and 7
  • Preprocessing and visualization
  • Binary classification using a custom neural network
  • Accuracy evaluation

๐Ÿ“ Project Structure

mnist-3-vs-7-classifier/
โ”œโ”€โ”€ mnist_3_vs_7_classifier.ipynb       # Jupyter notebook with code
โ”œโ”€โ”€ requirements.txt                    # Python dependencies
โ”œโ”€โ”€ README.md                           # Project overview
โ””โ”€โ”€ .gitignore                          # Files to ignore in version control

๐Ÿš€ Getting Started

1. Clone the repository

git clone https://github.com/your-username/mnist-3-vs-7-classifier.git
cd mnist-3-vs-7-classifier

2. Set up your environment (optional)

python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

3. Install dependencies

pip install -r requirements.txt

4. Launch the notebook

jupyter notebook mnist_3_vs_7_classifier.ipynb

๐Ÿ“Š Dataset

Uses the built-in MNIST dataset from torchvision.datasets. The notebook filters for only digits 3 and 7.

๐Ÿ› ๏ธ Tools Used

  • Python
  • PyTorch
  • Matplotlib
  • NumPy

๐Ÿ“„ License

This project is licensed under the MIT License.