A simple digits recognition neural network
Project description
Convolutional Neural Network using MNIST dataset for Digit Recognition
Official repository: https://github.com/MartinBraquet/ml-digits-recognition.
Test online: https://martinbraquet.com/index.php/solo_page_digits_recognition.
Installation from PyPI
pip install ml-digits-recognition
Usage
from ml_digits_recognition import drawing
drawing.run()
Installation from Source
For basic usage:
pip install -e "."
For development:
pip install -e ".[dev]"
Documentation
Click here for a full description.
Visualization of the convolutional neural network:
nn_visualization.ipynb
Training
Train the model and save it as model.pt.
ml_digits_recognition_training.ipynb
Accuracy vs epochs.
Loss vs epochs.
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
CI / CD
Each commit on the main branch is subject to a CI test.
A new version is released to PyPI when a tag is created. TODO: Set version in pyproject.toml only, then trigger a new PyPI release (and git tag) by updating the version and pushing into main. The CD should thus check on each push on main, if the package is more recent than the last tag, then build and deploy new release. This is faster as one only needs to update locally the version in pyproject.toml in the same commit as the fixes for the new release. The rest is automated, so it can all be done from a local IDE.
The version can be accessible at other places if desired. For example in __init__.py:
import importlib.metadata
__version__ = importlib.metadata.version(__package__)
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ml_digits_recognition-1.4.0.tar.gz.
File metadata
- Download URL: ml_digits_recognition-1.4.0.tar.gz
- Upload date:
- Size: 59.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fed6c6a22a24570daac8524685b96ff4fa9bcf8092afaf5bf14919b0c4d4fa9
|
|
| MD5 |
a2859db26352579eaae5c80e9f8d2453
|
|
| BLAKE2b-256 |
6dbd9f67662fa3cf4bad26a9dacc6d66899eb0e330ace07a3211e85def9d88da
|
File details
Details for the file ml_digits_recognition-1.4.0-py3-none-any.whl.
File metadata
- Download URL: ml_digits_recognition-1.4.0-py3-none-any.whl
- Upload date:
- Size: 58.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55506636ac304f46edec1370f3b334a9510eebfca506ac00ae853c8f5da4e4c1
|
|
| MD5 |
a0214b5ac8dadeb32842b98d4da6e0c7
|
|
| BLAKE2b-256 |
e3ce47019a6f012013eccda7ec063731030c458ed2b79be7b670f19880bf1ccb
|