# Convolutional Neural Network using MNIST dataset for Digit Recognition
[![Release](https://img.shields.io/pypi/v/ml-digits-recognition?label=Release&style=flat-square)](https://pypi.org/project/ml-digits-recognition/)
[![CI](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/ci.yml/badge.svg)](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/ci.yml/badge.svg)
[![CD](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/cd.yml/badge.svg)](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/cd.yml/badge.svg)
[![Coverage](https://codecov.io/gh/MartinBraquet/ml-digits-recognition/branch/main/graph/badge.svg)](https://codecov.io/gh/MartinBraquet/ml-digits-recognition)
[![Documentation Status](https://readthedocs.org/projects/ml-digits-recognition/badge/?version=latest)](https://ml-digits-recognition.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://static.pepy.tech/badge/ml-digits-recognition)](https://pepy.tech/project/ml-digits-recognition) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Official repository: https://github.com/MartinBraquet/ml-digits-recognition.
Test online: https://martinbraquet.com/index.php/solo_page_digits_recognition.
![Alt Text](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/demo.gif)
## Installation from PyPI
```
pip install ml-digits-recognition
```
### Usage
```
from ml_digits_recognition import drawing
drawing.run()
```
## Installation from Source
```
pip install -r requirements.txt
```
## Documentation
Click [here](https://martinbraquet.com/index.php/research/#Convolutional_Neural_Network_using_MNIST_Dataset_for_Digit_Recognition) for a full description.
Visualization of the convolutional neural network:
```
nn_visualization.ipynb
```
![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/nn1.png)
![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/nn2.png)
## Training
Train the model and save it as `model.pt`.
```
ml_digits_recognition_training.ipynb
```
Accuracy vs epochs.
![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/accuracy.png)
Loss vs epochs.
![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/loss.png)
## Test
Test in Jupiter Notebook. The model can be loaded from the training above in `model.pt` or from the
default precise model in `model_precise.pt`.
```
ml_digits_recognition_test.ipynb
```
Test in Python.
```
python src/ml_digits_recognition/drawing.py
```
## Tools
Draw a digit and save it as a PNG file.
```
user_input_drawing.ipynb
```
## Issues / Bug reports / Feature requests
Please open an issue.
## Contributions
Contributions are welcome. Please check the outstanding issues and feel free to open a pull request.
### Contributors
[![Contributors](https://contrib.rocks/image?repo=MartinBraquet/ml-digits-recognition)](https://github.com/MartinBraquet/ml-digits-recognition/graphs/contributors)
Raw data
{
"_id": null,
"home_page": null,
"name": "ml-digits-recognition",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Martin",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/1a/f7/0770fc1966648fabb2790198d6c8fcfddb6130fdb4b8a9acea6f0f0300ec/ml_digits_recognition-0.0.8.tar.gz",
"platform": null,
"description": "# Convolutional Neural Network using MNIST dataset for Digit Recognition\n\n\n[![Release](https://img.shields.io/pypi/v/ml-digits-recognition?label=Release&style=flat-square)](https://pypi.org/project/ml-digits-recognition/)\n[![CI](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/ci.yml/badge.svg)](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/ci.yml/badge.svg)\n[![CD](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/cd.yml/badge.svg)](https://github.com/MartinBraquet/ml-digits-recognition/actions/workflows/cd.yml/badge.svg)\n[![Coverage](https://codecov.io/gh/MartinBraquet/ml-digits-recognition/branch/main/graph/badge.svg)](https://codecov.io/gh/MartinBraquet/ml-digits-recognition)\n[![Documentation Status](https://readthedocs.org/projects/ml-digits-recognition/badge/?version=latest)](https://ml-digits-recognition.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://static.pepy.tech/badge/ml-digits-recognition)](https://pepy.tech/project/ml-digits-recognition) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nOfficial repository: https://github.com/MartinBraquet/ml-digits-recognition.\n\nTest online: https://martinbraquet.com/index.php/solo_page_digits_recognition.\n\n![Alt Text](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/demo.gif)\n\n## Installation from PyPI\n\n```\npip install ml-digits-recognition\n```\n\n### Usage\n\n```\nfrom ml_digits_recognition import drawing\ndrawing.run()\n```\n\n\n\n## Installation from Source\n\n```\npip install -r requirements.txt\n```\n\n## Documentation\n\nClick [here](https://martinbraquet.com/index.php/research/#Convolutional_Neural_Network_using_MNIST_Dataset_for_Digit_Recognition) for a full description.\n\nVisualization of the convolutional neural network:\n\n```\nnn_visualization.ipynb\n```\n\n![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/nn1.png)\n\n![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/nn2.png)\n\n## Training\n\nTrain the model and save it as `model.pt`.\n\n```\nml_digits_recognition_training.ipynb\n```\n\nAccuracy vs epochs.\n\n![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/accuracy.png)\n\nLoss vs epochs.\n\n![](https://raw.githubusercontent.com/MartinBraquet/ml-digits-recognition/main/src/ml_digits_recognition/loss.png)\n\n## Test\n\nTest in Jupiter Notebook. The model can be loaded from the training above in `model.pt` or from the \ndefault precise model in `model_precise.pt`.\n\n```\nml_digits_recognition_test.ipynb\n```\n\nTest in Python.\n\n```\npython src/ml_digits_recognition/drawing.py\n```\n\n## Tools\n\nDraw a digit and save it as a PNG file.\n\n```\nuser_input_drawing.ipynb\n```\n\n## Issues / Bug reports / Feature requests\n\nPlease open an issue.\n\n## Contributions\n\nContributions are welcome. Please check the outstanding issues and feel free to open a pull request.\n\n### Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=MartinBraquet/ml-digits-recognition)](https://github.com/MartinBraquet/ml-digits-recognition/graphs/contributors)\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple digits recognition neural network",
"version": "0.0.8",
"project_urls": {
"Bug Tracker": "https://github.com/MartinBraquet/ml-digits-recognition/issues",
"Homepage": "https://github.com/MartinBraquet/ml-digits-recognition"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aa605cd6f7bcaff7409e7b21bed3e29dccb20e65cbdcc9046908d85ea7eb816f",
"md5": "1f4b1f7509e0115ff802b58442a7e2b5",
"sha256": "efbe3498b71bf17e2978186794c1273a4b57048818c4728009a8550874962fe1"
},
"downloads": -1,
"filename": "ml_digits_recognition-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1f4b1f7509e0115ff802b58442a7e2b5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 56800,
"upload_time": "2024-03-25T05:46:24",
"upload_time_iso_8601": "2024-03-25T05:46:24.406775Z",
"url": "https://files.pythonhosted.org/packages/aa/60/5cd6f7bcaff7409e7b21bed3e29dccb20e65cbdcc9046908d85ea7eb816f/ml_digits_recognition-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1af70770fc1966648fabb2790198d6c8fcfddb6130fdb4b8a9acea6f0f0300ec",
"md5": "07efabdce177add8623ba45579f6b9fc",
"sha256": "7f0b3983739397dd75410f4e6b662160b314e1b7f55aa5be99e97132c17a4886"
},
"downloads": -1,
"filename": "ml_digits_recognition-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "07efabdce177add8623ba45579f6b9fc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 57653,
"upload_time": "2024-03-25T05:46:26",
"upload_time_iso_8601": "2024-03-25T05:46:26.013773Z",
"url": "https://files.pythonhosted.org/packages/1a/f7/0770fc1966648fabb2790198d6c8fcfddb6130fdb4b8a9acea6f0f0300ec/ml_digits_recognition-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-25 05:46:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MartinBraquet",
"github_project": "ml-digits-recognition",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pillow",
"specs": []
},
{
"name": "torch",
"specs": []
},
{
"name": "torchvision",
"specs": []
}
],
"lcname": "ml-digits-recognition"
}