This project is a neural network with several implementations that recognizes the letters of the Latin alphabet. The neural network has two versions. The interface is intuitive and does not need special consideration.
- Matrix neural network - all layers are represented as a matrix of weights.
- Graph - each neuron is represented by a separate object that is connected with the rest.
For assembly you need:
CMAKE 3.5
and higherQT 5.15.2
and higher
All data necessary for training and testing the neural network is in the archive emnist/emnist-data.tar.gz
In order for the neural network to be able to determine the letters in the drawn or downloaded image, it is necessary either to train neural network, or load ready-made weights.
- The image is drawn on the left side of the screen on a white canvas with the help of LMB, in order to erase
drawn image - click RMB. As you draw, the neural network will predict the letter you have drawn.
Further, this drawn image can be saved using the
↓
button to the directory of your choice. - You can upload an image using the
↑
button, after that it will appear on the canvas on the left side, where it can be edited.
In order for the neural network to be able to determine the letter, it is necessary to train it, or load ready-made weights.
- Training is launched on the
TRAIN
button in a separate thread, with parameters from the settings (by default, this is a classic training a matrix neural network with two hidden layers and one training epoch), you can set the settings yourself, more on this later. After training, a graph will be opened showing the percentage of the neural network error at each of the training epochs. If you wish, you can save the received weights on the↓
button to the directory of your choice. - You can also load ready-made weights using the
↑
button. The user himself must select the correct weights for any type of network.
After the neural network has been trained or the weights have been loaded, you can run tests on the specified sample
(from 0 to 1, in case of 0 - there is no test sample, tests are not run, in case of 1 - test sample is 100%)
over this neural network.
By clicking on the TEST
button, the test module will be launched in a separate thread, and a window will open with all the main
metrics.
Namely:
- Average accuracy (%)
- Precision (%)
- Recall (%)
- F-measure (%)
- Time (sec)
The input test data must also be selected correctly by the user.
Settings open on the SETTINGS
button, you can configure them:
- Type of neural network, graph or matrix.
MATRIX
orGRAPH
. - The number of hidden layers.
2-5
. - Number of epochs to train (if cross-validation is disabled).
1-5
. - Availability of cross-validation.
TRUE
orFALSE
- Number of k-groups (if cross-validation is enabled).
1-10
. - Test sample.
0-1
.
The work was completed by: Savin Anton (telvina), Andrey Degtyarev (sreanna).