Skip to content

Razvan48/Digit-Recognizer-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digit-Recognizer-in-Python

  A simple digit recognizer written using Python.


Details:


  The first attempt used the K-Nearest Neighbors (KNN) Algorithm with K = 100.
  10000 MNIST digits pictures were used as train data (28x28 pixel images of just one colour channel).
  L1 and L2 metrics were used, L2 seems to work better.
  Used PyGame for the graphical interface, along with Numpy for fast vectorization.
  Tried using a MLP Classifier (Multi-Layer Perceptron Classifier) with 2 hidden layers of size 64, learning rate 0.001 and early stopping.
  The MLP Classifier performed ok after being trained with 60000 images.
  Also tried using a SVC (Support Vector Classifier) with the RBF Kernel Function and 30000 images as train.
  Tried a convolutional neural network using the TensorFlow library. It showed the best results so far. The accuracy is around 99.5%.
  The convolutional network had 3 convolutional layers, with max pooling 2D in between, followed by a dense layer and an output layer.


Example of usage: