This is a Java implementation of a simple 3-layer neural network that interprets handwritten digits.
Before cloning this project, be sure to install Git Large File Storage:
- Go to https://git-lfs.github.com/ and install Git LFS.
- If you cloned the project first, then downloaded LFS, run
git lfs pull
in the project to pull the large files.
This project uses the Java Matrix package known as JAMA. In order to run this program, JAMA needs to be installed.
- Download Jama-1.0.3.jar (http://math.nist.gov/javanumerics/jama/Jama-1.0.3.jar)
- Make sure that you have read permissions, and take note of the file path which will be used later.
- Run
javac -cp <path to JAMA> *.java
Note: After running the command below, it may take a few minutes to load because the neural network is training itself to recognize the numbers.
-
For Linux:
- Run
java -cp <path to JAMA> main
- Run
-
For Windows:
- Run
java -cp <path to JAMA>; main
- Run
-
If the run was successful the command line should look like this:
-
Push submit to have your drawn number evaluated by the neural network:
-
Push clear to start the whole process over again.
Although the this program is about 95% accurate, with the testing data in its current iteration it is significantly less accurate with user drawn numbers, and is still very much a work in progress when it comes to improving the accuracy of this feature.
- Git LFS
- JAMA - (http://math.nist.gov/javanumerics/jama/)
- MNIST data - (https://en.wikipedia.org/wiki/MNIST_database)