Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/razvan48/digit-recognizer-in-python
A simple digit recognizer written using Python.
https://github.com/razvan48/digit-recognizer-in-python
graphics knn knn-algorithm knn-classification machine-learning machine-learning-algorithms numpy pygame python
Last synced: about 1 month ago
JSON representation
A simple digit recognizer written using Python.
- Host: GitHub
- URL: https://github.com/razvan48/digit-recognizer-in-python
- Owner: Razvan48
- Created: 2024-06-26T19:56:10.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T19:32:43.000Z (4 months ago)
- Last Synced: 2024-09-15T04:43:49.859Z (4 months ago)
- Topics: graphics, knn, knn-algorithm, knn-classification, machine-learning, machine-learning-algorithms, numpy, pygame, python
- Language: Python
- Homepage:
- Size: 4.07 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:**