https://github.com/boshtannik/nn_handwrite_number_recognize
Fork of simple neural network to recognize handwrite digits, took from MNIST dataset
https://github.com/boshtannik/nn_handwrite_number_recognize
Last synced: 3 months ago
JSON representation
Fork of simple neural network to recognize handwrite digits, took from MNIST dataset
- Host: GitHub
- URL: https://github.com/boshtannik/nn_handwrite_number_recognize
- Owner: boshtannik
- License: gpl-3.0
- Created: 2023-05-06T22:32:17.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-21T08:57:22.000Z (almost 2 years ago)
- Last Synced: 2025-01-20T07:34:03.071Z (4 months ago)
- Language: Python
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NN_handwrite_number_recognize
Fork of simple neural network to recognize handwrite digits, took from MNIST dataset(All consider using `python3` - when `python` is mentioned)
To work with neural network - it must have mnist dataset installed.
Two options of dataset available. So you can install it in few ways.You can chose to install large or small dataset.
To install large dataset for training (60 000 examples) - run ```bash ./install_data.sh```. Or to install smaller dataset for training (100 examples) - run ```bash ./install_data_small.sh```Then you can run ```python neural_network.py``` - It will use downloaded files to train NN model.
I would reccoment to use ```pypy``` instead of ```python``` - Special python interpreter with JIT compiler - which will make train a LOT fasterAlso you can visually check - if the neural network did good train. For this purpose `tester.py` - is provided.
To run that, you need to have pygame library installed.
Here is the instruction i offer to follow to get it installed:
1 - I recommend you to use virtual environment package. To install it - use `sudo apt install python-venv`
2 - then create your local isolated python environment. To create it - use `python -m venv venv` - It will create directory venv in your current directory
3 - Use just installed local python environment. To use it - run `source ./venv/bin/activate` - You will see (venv) prefix in your prompt
4 - Install all required dependencies of tester.py into local environment. To install them - run `pip install -r requirements.txt` - It will read requirements file end then install dependencies.
5 - Run it ```python tester.py``` - It will take some time to load your trained neural network data, and then immediately will show you the GUIGUI:
Button `Next` - Will read next line from test dataset, load it onto canvas, and then will make the classification
Button `Recognize` - Will send data from canvas to neural network - to make classification
Button `Clear` - Will make canvas clean
Also you can draw onto canvas - and then immediately send drawn data into NN, and make the classification of drawn symbol.