{"id":16949233,"url":"https://github.com/f4str/digit-recognizer","last_synced_at":"2026-05-16T12:33:48.841Z","repository":{"id":55033339,"uuid":"239673369","full_name":"f4str/digit-recognizer","owner":"f4str","description":"Classifiers for recognizing MNIST handwritten digits","archived":false,"fork":false,"pushed_at":"2022-05-23T06:39:03.000Z","size":287,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T06:26:25.081Z","etag":null,"topics":["gui","machine-learning","mnist","neural-network","python","pytorch","tkinter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f4str.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-11T04:11:07.000Z","updated_at":"2022-05-23T06:39:09.000Z","dependencies_parsed_at":"2022-08-14T09:40:39.759Z","dependency_job_id":null,"html_url":"https://github.com/f4str/digit-recognizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4str%2Fdigit-recognizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4str%2Fdigit-recognizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4str%2Fdigit-recognizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4str%2Fdigit-recognizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f4str","download_url":"https://codeload.github.com/f4str/digit-recognizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776340,"owners_count":20508506,"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":["gui","machine-learning","mnist","neural-network","python","pytorch","tkinter"],"created_at":"2024-10-13T21:53:30.075Z","updated_at":"2026-05-16T12:33:43.823Z","avatar_url":"https://github.com/f4str.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digit Recognizer\n\nSimple implementations of different types of neural network classifiers and training scripts for the MNIST data set using `PyTorch`. Also includes a GUI using `Tkinter` to draw digits and predict accordingly.\n\n## Installation\n\nClone the repository.\n\n```bash\ngit clone https://github.com/f4str/digit-recognizer\n```\n\nChange directories into the cloned repository.\n\n```bash\ncd digit-recognizer\n```\n\nInstall Python and create a virtual environment.\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nInstall the dev dependencies using pip.\n\n```bash\npip install -e .[dev]\n```\n\n## Usage\n\n### Model Training\n\nFirst train a model with the desired name and arguments.\n\n```bash\npython digit_recognizer/train.py --name {NAME} [...args]\n```\n\nThis will create and train a model in `saved_models/{NAME}` based on the arguments provided. To view information on the available arguments, pass the `-h` flag.\n\n### Model Evaluation\n\nA trained model can be evaluated if desired. Ensure the name and arguments matches the saved model exactly.\n\n```bash\npython digit_recognizer/test.py --name {NAME} [...args]\n```\n\nTo view information on the available arguments, pass the `-h` flag.\n\n### GUI Canvas\n\nLaunch the GUI which will create a canvas to draw and recognize digits using the saved model. Ensure the name and arguments matches the saved model exactly.\n\n```bash\npython digit_recognizer/gui.py --name {NAME} [...args]\n```\n\nTo view information on the available arguments, pass the `-h` flag.\n\nIn the canvas, draw by clicking and holding left click. To erase any segment, click and hold right click. To clear the entire screen, click the clear button. After drawing a digit, click the predict button. A prediction will be displayed along with the confidence percentage.\n\n## Development\n\nThe `tox` library is used to run all tests and code formatting. This is automatically installed with the dev requirements. The available options are as follows.\n\n* Run linting checks using `flake8`.\n\n    ```bash\n    tox -e lint\n    ```\n\n* Run type checks using `mypy`.\n\n    ```bash\n    tox -e type\n    ```\n\n* Run unit tests `pytest`.\n\n    ```bash\n    tox -e test\n    ```\n\n* Run all three of the tests above.\n\n    ```bash\n    tox\n    ```\n\n* Format the code using `black` and `isort` to comply with linting conventions.\n\n    ```bash\n    tox -e format\n    ```\n\nUpon pull request, merge, or push to the `master` branch, the three tests with `tox` will be run using GitHub Actions. The workflow will fail if any of the tests fail. See `.github/workflows/python-package.yml` for more information on how the CI works.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4str%2Fdigit-recognizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff4str%2Fdigit-recognizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4str%2Fdigit-recognizer/lists"}