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
Release files for ml-digits-recognition 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ml_digits_recognition-1.4.0.tar.gz | 59.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ml_digits_recognition-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 117.8 kB
Release files / ml_digits_recognition-1.4.0.tar.gz
| Download URL | ml_digits_recognition-1.4.0.tar.gz |
|---|---|
| Size | 59.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fed6c6a22a24570daac8524685b96ff4fa9bcf8092afaf5bf14919b0c4d4fa9
|
|
BLAKE2b-256 checksum How to use checksums |
6dbd9f67662fa3cf4bad26a9dacc6d66899eb0e330ace07a3211e85def9d88da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / ml_digits_recognition-1.4.0-py3-none-any.whl
| Download URL | ml_digits_recognition-1.4.0-py3-none-any.whl |
|---|---|
| Size | 58.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55506636ac304f46edec1370f3b334a9510eebfca506ac00ae853c8f5da4e4c1
|
|
BLAKE2b-256 checksum How to use checksums |
e3ce47019a6f012013eccda7ec063731030c458ed2b79be7b670f19880bf1ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|