https://github.com/niklashenning/handwritten-digit-recognition
Handwritten digit recognition machine learning model (HwD-1000 dataset)
https://github.com/niklashenning/handwritten-digit-recognition
classification computer-vision digit-recognition handwriting-recognition image-classification machine-learning
Last synced: 4 months ago
JSON representation
Handwritten digit recognition machine learning model (HwD-1000 dataset)
- Host: GitHub
- URL: https://github.com/niklashenning/handwritten-digit-recognition
- Owner: niklashenning
- License: mit
- Created: 2024-09-20T22:47:45.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-08T15:48:39.000Z (over 1 year ago)
- Last Synced: 2026-02-06T13:42:55.872Z (5 months ago)
- Topics: classification, computer-vision, digit-recognition, handwriting-recognition, image-classification, machine-learning
- Language: Python
- Homepage:
- Size: 604 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Handwritten Digit Recognition
A machine learning model that recognizes handwritten digits based on my
HwD-1000 dataset.
## About
This basic machine learning model is trained on the [HwD-1000 dataset](https://github.com/niklashenning/hwd-1000-dataset)
and is able to accurately classify and recognize digits from images.
It utilizes PyTorch's neural networks and Tensor libraries for training the model, pandas for loading
and handling the dataset, Pillow for loading and converting the images, and Matplotlib
for visualizing the training results.
## Dataset
The dataset contains 1000 images of single digits (0-9) that have been manually drawn on a white
28x28 px background with a black pen in varying widths and styles.

## Results
The neural network was trained for 50 epochs with a learning rate of 0.001 using AdamW
as the optimizer and CrossEntropyLoss as the criterion. Training was done on 80%
of the dataset while the remaining 20% were used to validate the results.
The model achieved an accuracy of 99.50% on the validation data.
```
Test Accuracy: 99.50% (199/200)
```
| Epoch | Loss |
|-------|----------|
| 1 | 1.506903 |
| 10 | 0.047416 |
| 20 | 0.011299 |
| 30 | 0.006869 |
| 40 | 0.002777 |
| 50 | 0.001392 |

## License
This software is licensed under the [MIT license](LICENSE).