A distributed machine learning engine built from scratch to recognize handwritten digits (MNIST dataset). It uses a MapReduce architecture and Python Multiprocessing to parallelize training across CPU cores.
- Custom Neural Network: Built entirely with
NumPy— no TensorFlow or PyTorch. - Distributed Training: Master–Worker architecture using
multiprocessing(MapReduce pattern). - Smart GUI: Tkinter-based application for real-time digit testing.
- Adaptive preprocessing based on ink density.
- Center of Mass alignment (MNIST-style).
- Real-time debug view.
git clone https://github.com/ramt11n/Distributed-MNIST.git
cd Distributed-MNISTpython3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install numpy pillowDownload the following files from Yann LeCun’s website and put them in the data/ folder:
- train-images-idx3-ubyte.gz
- train-labels-idx1-ubyte.gz
- t10k-images-idx3-ubyte.gz
- t10k-labels-idx1-ubyte.gz
python3 main.pypython3 app.py| File | Description |
|---|---|
| src/neural_net.py | Matrix ops, forward/backward propagation. |
| src/worker.py | Worker process logic (Map phase). |
| src/mnist_loader.py | IDX file parsers. |
| main.py | Master process (Reduce phase). |
| app.py | GUI for drawing, preprocessing, prediction. |
Created by Ramtin Neshat