{"id":21358712,"url":"https://github.com/razvan48/digit-recognizer-in-python","last_synced_at":"2026-05-17T19:39:09.293Z","repository":{"id":246271450,"uuid":"820600417","full_name":"Razvan48/Digit-Recognizer-in-Python","owner":"Razvan48","description":"A simple digit recognizer written using Python.","archived":false,"fork":false,"pushed_at":"2024-09-14T19:32:43.000Z","size":4270,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T18:50:55.350Z","etag":null,"topics":["graphics","knn","knn-algorithm","knn-classification","machine-learning","machine-learning-algorithms","numpy","pygame","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Razvan48.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-26T19:56:10.000Z","updated_at":"2024-09-14T19:32:46.000Z","dependencies_parsed_at":"2024-06-27T00:21:12.027Z","dependency_job_id":"e52f6172-da45-461e-ac05-075fcbb26afd","html_url":"https://github.com/Razvan48/Digit-Recognizer-in-Python","commit_stats":null,"previous_names":["razvan48/digit-recognizer-in-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Razvan48%2FDigit-Recognizer-in-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Razvan48%2FDigit-Recognizer-in-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Razvan48%2FDigit-Recognizer-in-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Razvan48%2FDigit-Recognizer-in-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Razvan48","download_url":"https://codeload.github.com/Razvan48/Digit-Recognizer-in-Python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830953,"owners_count":20354856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphics","knn","knn-algorithm","knn-classification","machine-learning","machine-learning-algorithms","numpy","pygame","python"],"created_at":"2024-11-22T05:21:44.268Z","updated_at":"2025-10-16T07:10:19.086Z","avatar_url":"https://github.com/Razvan48.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digit-Recognizer-in-Python\n\u0026emsp; A simple digit recognizer written using Python. \u003cbr/\u003e\n\n\u003cbr/\u003e\n\n**Details:** \u003cbr/\u003e\n\n\u003cbr/\u003e\n\n\u0026emsp; The first attempt used the K-Nearest Neighbors (KNN) Algorithm with K = 100. \u003cbr/\u003e\n\u0026emsp; 10000 MNIST digits pictures were used as train data (28x28 pixel images of just one colour channel). \u003cbr/\u003e\n\u0026emsp; L1 and L2 metrics were used, L2 seems to work better. \u003cbr/\u003e\n\u0026emsp; Used PyGame for the graphical interface, along with Numpy for fast vectorization. \u003cbr/\u003e\n\u0026emsp; Tried using a MLP Classifier (Multi-Layer Perceptron Classifier) with 2 hidden layers of size 64, learning rate 0.001 and early stopping. \u003cbr/\u003e\n\u0026emsp; The MLP Classifier performed ok after being trained with 60000 images. \u003cbr/\u003e\n\u0026emsp; Also tried using a SVC (Support Vector Classifier) with the RBF Kernel Function and 30000 images as train. \u003cbr/\u003e\n\u0026emsp; Tried a convolutional neural network using the TensorFlow library. It showed the best results so far. The accuracy is around 99.5%. \u003cbr/\u003e\n\u0026emsp; The convolutional network had 3 convolutional layers, with max pooling 2D in between, followed by a dense layer and an output layer. \u003cbr/\u003e\n\n\u003cbr/\u003e\n\n**Example of usage:** \u003cbr/\u003e\n\n\u003cp align = \"center\"\u003e\n  \u003cimg width=\"800\" height=\"533\" src=\"https://github.com/Razvan48/Digit-Recognizer-in-Python/blob/main/demo/ezgif.com-video-to-gif-converter.gif\"\u003e\n\u003c/p\u003e\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazvan48%2Fdigit-recognizer-in-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazvan48%2Fdigit-recognizer-in-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazvan48%2Fdigit-recognizer-in-python/lists"}