How hnx07/handwritten-digit-recognition works
This repository is a NumPy-based handwritten-digit recognizer with an OpenCV drawing interface. The primary user workflow is to draw a digit, trigger prediction, and see the predicted class printed; the app loads saved weights, preprocesses the drawing, and calls the model. A separate training script loads CSV data and uses the same model implementation for gradient descent. The tree includes the app’s weight file, but the training script saves to a different filename, so no training-to-included-weights link is shown.
Main entry points: app.py Drawing and prediction app · train.py Training workflow · model.py Neural network · best_weight.npz Saved model weights
Components 7
Recognition interface
- Drawing and prediction app
app.py - Printed prediction
Model and training
- Training workflow
train.py - Neural network
model.py
Model artifacts
- Saved model weights
weights/best_weight.npz
Other components
- User
- MNIST CSV data
Connections 6
- User → Drawing and prediction app: draws and predicts
README.md - Drawing and prediction app → Saved model weights: loads weights
app.py - Drawing and prediction app → Neural network: calls inference
app.py - Drawing and prediction app → Printed prediction: prints class
app.py - Training workflow → MNIST CSV data: loads data
train.py - Training workflow → Neural network: runs training
train.py