An open API service indexing awesome lists of open source software.

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)

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).