https://github.com/sidsurakanti/mnist-classification
mnist digit classification from scratch w/ only numpy and maths
https://github.com/sidsurakanti/mnist-classification
math ml mnist numpy
Last synced: 10 months ago
JSON representation
mnist digit classification from scratch w/ only numpy and maths
- Host: GitHub
- URL: https://github.com/sidsurakanti/mnist-classification
- Owner: sidsurakanti
- Created: 2025-04-12T03:29:25.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-14T23:29:26.000Z (10 months ago)
- Last Synced: 2025-04-15T00:29:31.286Z (10 months ago)
- Topics: math, ml, mnist, numpy
- Language: Jupyter Notebook
- Homepage:
- Size: 2.12 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
MNIST digit classifier built with just NumPy and Math. It also has a Pytorch + a realtime web implementation using FastAPI and Next.js.

## What I learned
- How to build a neural net from scratch
- Forward and backward propagation using pure math
- Vectorized operations with NumPy
- Loss functions, softmax, and gradient descent
- Data normalization and preprocessing
- Pytorch
- Model deployment with FastAPI
## Stack








## Getting started
Play around with the project w/ demo.py or view the demo web app locally.
### Prerequisites
- Python 3.x
- pip
- Node.js 18+
- npm
### Installation
```bash
git clone https://github.com/sidsurakanti/mnist-digit-recog.git
cd /path/to/project/
# backend setup
pip install -r requirements.txt
fastapi dev predict.py
# frontend setup
cd frontend
npm install
npm run dev
```
The app should now be live on http://localhost:3000!
## Roadmap
- [x] Build a neural net with only NumPy
- [x] Implement backpropagation
- [X] Add softmax + cross-entropy
- [x] Visualize accuracy/loss
- [X] Rebuild using Pytorch
- [X] Add GUI to draw digits and classify in real-time
- [ ] Deploy online
- [ ] Improve digit preprocessing for the HTML canvas