I'm training a simple neural network to recognize handwritten digits. You can execute the program and draw your own digit. The network makes a prediction and tells you what digit you drew. I implemented a neural network with one hidden layer and a variable amount of input and output neurons. The network has an accuracy of 93.4% on the mnist test data, but the accuracy is lower with the GUI (will be fixed in the future).
GUI
that promts the user to draw a digits on a canvasData Loader
that loads and handles the mnist dataNetwork class
which creates a neural networkMatrix class
with matrix calculationsGraph class
that creates graphs for the training process of the network (work in progress)Mnist
training data is included
JavaFX
+FXML
Java
languageMnist
datasetMaven
build automation toolVSCode
editor
- Clone the repository (or download the zip from github):
git clone https://github.com/FrozenBirdXD/digitRecognition.git
- Change the file location of
weights-biases.txt
in theSimpleNetwork
class to the relative file location e.g.:digitRecognition\\app\\src\\weights-biases.txt
- Navigate to the project directory with the
pom.xml
file:
e.g.: cd digitRecognition/app
- Build the project and install the package files:
mvn install
- Run the 'main' method of the class called App to start the program/GUI.
To use the program run the 'main' method to start. Then just draw a digit!
- fix accuracy problem with GUI
- implement a convolutional neural network (CNN)
- recognize whole number not just digits
- add help section with relevant equations for machine learning as lookup
The following list contains links to great articles and other helpful content I used for this project:
- Neural networks and deep learning by Michael Nielsen
- The MNIST Database by Yann LeCun, Corinna Cortes, Christopher J.C. Burges
- Deep learning by Ian Goodfellow and Yoshua Bengio and Aaron Courville
- Performance of Matrix multiplication in Python, Java and C++ by Martin Thoma
This project is still work in progress but a "pre-release" will be created in the near future.