fa1c48496f16f54aaba8b1d40f637dc5db10e0b4
[handwriting-recognition.git] / README.md
1 # Resources
2
3 Basics:
4  - [Learn numpy](https://numpy.org/learn/)
5  - [MNIST database of handwritten digits](http://yann.lecun.com/exdb/mnist/)
6  - [Neuron](https://en.wikipedia.org/wiki/Artificial_neuron)
7  - [Perceptron](https://en.wikipedia.org/wiki/Perceptron)
8  - [3Blue1Brown video series](https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi)
9
10 Too high-level for first-time learning, but apparently very abstract and powerful for real-life:
11  - [keras](https://keras.io/)
12  - [tutorial how to recognize handwriting with keras/tensorflow](https://data-flair.training/blogs/python-deep-learning-project-handwritten-digit-recognition/)
13
14 # Dependencies
15
16     sudo dnf install -y python3-numpy python3-matplotlib
17
18 # Steps
19
20  - Do the [NumPy quickstart tutorial](https://numpy.org/devdocs/user/quickstart.html); example:
21
22 ```py
23 import numpy as np
24 import matplotlib.pyplot as plt
25 grad = np.linspace(0,1,10000).reshape(100,100)
26 plt.imshow(grad, cmap='gray')
27 plt.show()
28
29 plt.imshow(np.sin(np.linspace(0,10000,10000)).reshape(100,100) ** 2, cmap='gray')
30 # non-blocking does not work with QT_QPA_PLATFORM=wayland
31 plt.show(block=False)
32 plt.close()
33 ```
34
35  - Get the handwritten digits training data with `./download-mnist.sh`
36
37  - Read the MNIST database into numpy arrays with `./read_display_mnist.py`. Plot the first ten images and show their labels, to make sure the data makes sense:
38
39    ![visualize training data](screenshots/mnist-visualize-training-data.png)