Skip to content

chirbard/java-handwritten-digits-classifier

Repository files navigation

Java Handwritten Digits Classifier

Simple Java program to classify a single handwritten digit from 0 to 9.

Trained model from: https://www.kaggle.com/code/wwsalmon/simple-mnist-nn-from-scratch-numpy-no-tf-keras

Installation, compiling and usage

No GUI

1. Download source

2. Compile

javac Tuvastamine.java

3. Download digit dataset

Example handwritten digits dataset: https://www.kaggle.com/competitions/digit-recognizer

Place the data in folder data/test.csv

4. Run the program

java Tuvastamine

5. Example usage

$ java Tuvastamine
Mitmendat pilti soovid testida (1-28000):
400






           .+%@@@@#:
      .:+*@@@@@@@@@@-
      +@@@@@@*-.  :@%.
      +@@@*.    .*@@@.
      .::       *%%##.
              .=@@@*
            .:#@@@@@#
            #@@@*- :#*
            -@+-    :@:
             .      -@+
                    -@%
                   =@@*
                 .+@@%:
                .%@@@=
   #.         :#@@@#:
   *@+- ..-=#@@@@@=
   =@@@@@@@@@@@@:
     +@@@@@@**-.




Mudeli hinnang: 3

Kas soovid veel testida? (jah/ei)
jah

Mitmendat pilti soovid testida (1-28000):
-45
Sellise indeksiga pilti pole, proovi uuesti!

Mitmendat pilti soovid testida (1-28000):
1




               -##.
          +@@@@@@@.
         :%@@@@@@@%#.
         %@@@@@@@@@@%:
         :@@@@=..=@@@+
          :===.   %@@@
                  :@@@
                  .@@@
                  -@@@
                  %@@@
            :--  .%@@#
        =-##%@@##%@@%.
    .=*@@@@@@@@@@@@@%=
    =@@@@@%%@@@@@@@@@@*
    @@@@#- .#@@@@==#@@@*
    @@@@@%%%@@@%:   *%@@
    *@@@@@@@@%=:     :@*
     .*****.






Mudeli hinnang: 2

Kas soovid veel testida? (jah/ei)
ei

GUI

1. Download source

2. Compile

javac --module-path lib --add-modules javafx.controls,javafx.fxml -d bin Main.java

3. Run the program

java --module-path lib --add-modules javafx.controls,javafx.fxml -cp bin Main

4. Example usage

Starting state

Screenshot from 2024-12-29 23-10-11

Predicting

Screenshot from 2024-12-29 23-13-21

About

Java program without any libraries to use a deep neural network to classify drawn digits 0-9

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages