{"id":28034863,"url":"https://github.com/emsar69/mnist-ai-without-external-ai-libraries","last_synced_at":"2026-05-18T06:40:02.964Z","repository":{"id":291964338,"uuid":"979386032","full_name":"emsar69/MNIST-AI-Without-External-AI-Libraries","owner":"emsar69","description":"A pure C++ implementation of an MNIST digit classifier without using external machine learning libraries. This project demonstrates how to build a simple neural network for the MNIST dataset.","archived":false,"fork":false,"pushed_at":"2025-05-08T16:29:04.000Z","size":4925,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-11T11:58:27.552Z","etag":null,"topics":["ai","c","classification","cpp","machine-learning","mnist"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emsar69.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-07T12:38:25.000Z","updated_at":"2025-05-08T16:29:07.000Z","dependencies_parsed_at":"2025-05-11T12:08:36.889Z","dependency_job_id":null,"html_url":"https://github.com/emsar69/MNIST-AI-Without-External-AI-Libraries","commit_stats":null,"previous_names":["emsar69/mnist_ai","emsar69/mnist-ai-without-external-libraries"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/emsar69/MNIST-AI-Without-External-AI-Libraries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsar69%2FMNIST-AI-Without-External-AI-Libraries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsar69%2FMNIST-AI-Without-External-AI-Libraries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsar69%2FMNIST-AI-Without-External-AI-Libraries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsar69%2FMNIST-AI-Without-External-AI-Libraries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emsar69","download_url":"https://codeload.github.com/emsar69/MNIST-AI-Without-External-AI-Libraries/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emsar69%2FMNIST-AI-Without-External-AI-Libraries/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267585826,"owners_count":24111577,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","c","classification","cpp","machine-learning","mnist"],"created_at":"2025-05-11T11:58:26.000Z","updated_at":"2026-05-18T06:40:02.875Z","avatar_url":"https://github.com/emsar69.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emsar69/MNIST-AI-Without-External-AI-Libraries\n\nArtifical Intelligence number recognization by images \u0026mdash; using no AI libraries\n\n## Quick Start\n\u003e Make sure you have installed cmake and C++ compiler.\n\n### Example Dataset\nUse the following structure of handwritten digits dataset:\n\n![Handwritten Digits](assets/mnist_dataset.png)\n\nRename your dataset folder to `mnist_dataset` or edit the code in `Main.cpp`:\n```cpp\nload_dataset(inputs, targets, \"mnist_dataset\", 3000); // Last parameter (3000) means how much data per number.\n```\n\n### Building With CMake\n\nIn project directory:\n```shell\nmkdir build\ncd build\n```\n\nUsing MinGW\n```shell\ncmake -G \"MinGW Makefiles\" ..\n```\n\nUsing Ninja\n```shell\ncmake -G \"Ninja\" ..\n```\n\nUsing Clang/Unix Based\n```shell\ncmake -G \"Unix Makefiles\" ..\n```\n\n### Example output\nExample neural network trained with 30k different image/label pairs output:\n\n```log\n\u003e .\\MNIST_AI.exe\n[DEBUG][14:51:03] -\u003e Dataset Loaded: 30000\n[DEBUG][14:51:03] -\u003e Training.\n[DEBUG][14:51:12] -\u003e Epoch 1 done. Train Accuracy: 91.29% | Test Accuracy: 95.07% | Loss: 0.28\n[DEBUG][14:51:20] -\u003e Epoch 2 done. Train Accuracy: 96.38% | Test Accuracy: 95.87% | Loss: 0.12\n[DEBUG][14:51:30] -\u003e Epoch 3 done. Train Accuracy: 97.73% | Test Accuracy: 96.80% | Loss: 0.08\n[DEBUG][14:51:39] -\u003e Epoch 4 done. Train Accuracy: 98.64% | Test Accuracy: 97.13% | Loss: 0.05\n[DEBUG][14:51:48] -\u003e Epoch 5 done. Train Accuracy: 99.15% | Test Accuracy: 97.47% | Loss: 0.03\n\u003e example.png\n[DEBUG][14:52:43] -\u003e 6.16999e-09 1.08969e-05 5.33723e-05 5.21402e-06 0.999413 3.98535e-08 5.83457e-06 0.000229053 6.17532e-07 0.000281614\n[DEBUG][14:52:43] -\u003e Which means, Neural network thinks this is a 4 with 100% confidence.\n```\n\n# License\n[GNU GENERAL PUBLIC LICENSE 3.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femsar69%2Fmnist-ai-without-external-ai-libraries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femsar69%2Fmnist-ai-without-external-ai-libraries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femsar69%2Fmnist-ai-without-external-ai-libraries/lists"}