{"id":22546307,"url":"https://github.com/mansurpro/digitrecognizer","last_synced_at":"2025-09-07T10:37:35.185Z","repository":{"id":266012335,"uuid":"897105899","full_name":"MansurPro/DigitRecognizer","owner":"MansurPro","description":"DigitRecognizer is a simple, handcrafted neural network implemented with NumPy to classify handwritten digits from the MNIST dataset. This project demonstrates the foundational principles of neural networks, including forward propagation, backpropagation, and gradient descent, all built from scratch without relying on deep learning frameworks.","archived":false,"fork":false,"pushed_at":"2024-12-02T03:40:35.000Z","size":11291,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T08:45:18.757Z","etag":null,"topics":["backpropagation","custom-dataset","data-visualization","deep-learning","from-scratch","gradient-descent","handwritten-digit-recognition","machine-learning","minimal-dependencies","mnist","neural-network","numpy","python"],"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/MansurPro.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}},"created_at":"2024-12-02T03:14:33.000Z","updated_at":"2025-01-06T15:20:21.000Z","dependencies_parsed_at":"2024-12-07T06:00:42.532Z","dependency_job_id":null,"html_url":"https://github.com/MansurPro/DigitRecognizer","commit_stats":null,"previous_names":["mansurpro/digitrecognizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansurPro%2FDigitRecognizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansurPro%2FDigitRecognizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansurPro%2FDigitRecognizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansurPro%2FDigitRecognizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MansurPro","download_url":"https://codeload.github.com/MansurPro/DigitRecognizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999322,"owners_count":20707554,"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":["backpropagation","custom-dataset","data-visualization","deep-learning","from-scratch","gradient-descent","handwritten-digit-recognition","machine-learning","minimal-dependencies","mnist","neural-network","numpy","python"],"created_at":"2024-12-07T15:06:52.895Z","updated_at":"2025-03-28T08:45:25.081Z","avatar_url":"https://github.com/MansurPro.png","language":"Python","readme":"\n# 🖊️ **DigitRecognizer**\n\nA handcrafted neural network built from scratch using NumPy to classify handwritten digits from the MNIST dataset. Perfect for learning and experimenting with core neural network concepts like forward propagation, backpropagation, and gradient descent.\n\n---\n\n## 🚀 **Features**\n\n✅ **Custom Neural Network**  \nA single hidden-layer network with sigmoid activation functions, trained entirely from scratch.  \n\n✅ **MNIST Dataset Integration**  \nSeamlessly loads and preprocesses the MNIST dataset for efficient training and testing.  \n\n✅ **Interactive Testing**  \nTest the model on MNIST data or your custom handwritten digits (`custom.png`).  \n\n✅ **Training Visualization**  \nMonitor the model's performance through loss and accuracy updates after every epoch.  \n\n✅ **Minimal Dependencies**  \nUses only Python, NumPy, and Matplotlib—no heavy frameworks required!  \n\n---\n\n## 📂 **Project Structure**\n\n```plaintext\nDigitRecognizer/\n│\n├── main.py         # Main script for training and testing\n├── test.py         # Interactive testing script\n├── utils.py        # Utility functions for loading the MNIST dataset\n├── mnist.npz       # Preloaded MNIST dataset\n├── custom.png      # Custom image for testing\n├── tests/\n│   ├── test2.png   # Additional test image 1\n│   └── test3.png   # Additional test image 2\n├── demo/\n│   └── demo        # Directory for demo files\n├── .gitignore      # Git ignore file for unnecessary files\n├── requirements.txt # List of required Python packages\n└── README.md       # Repository documentation\n```\n\n---\n\n## 🛠️ **Getting Started**\n\n### **1. Clone the Repository**\n\n```bash\ngit clone https://github.com/MansurPro/DigitRecognizer.git\ncd DigitRecognizer\n```\n\n### **2. Install Dependencies**\n\nEnsure you have Python installed, then install NumPy and Matplotlib:\n\n```bash\npip install -r requirements.txt\n```\n\n### **3. Train the Model**\n\nRun the `main.py` script to train the neural network on the MNIST dataset:\n\n```bash\npython main.py\n```\n\n### **4. Test the Model**\n\nUse `test.py` to interactively test the model with MNIST data or custom images:\n\n```bash\npython test.py\n```\n\n---\n\n## 🎨 **Preview**\n\n### Training Visualization:\n![Training Visualization](demo/testing_demo.png)\n\n### Interactive Testing (success):\n![Interactive Testing](demo/success_demo.png)\n\n### Interactive Testing (fail):\n![Interactive Testing](demo/fail_demo.png)\n\n---\n\n## 📊 **How It Works**\n\n1. **Input Layer**: Processes 784-pixel flattened grayscale images.  \n2. **Hidden Layer**: Applies sigmoid activation for feature extraction.  \n3. **Output Layer**: Outputs predictions using sigmoid activation.  \n4. **Backpropagation**: Optimizes weights and biases to minimize error using gradient descent.\n\n---\n\n## 🧑‍💻 **Contributions**\n\nWe welcome contributions! Feel free to fork this repository, open issues, or submit pull requests.\n\n---\n\n## 📜 **License**\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.\n\n---\n\n## 🙌 **Acknowledgments**\n\nSpecial thanks to the creators of the MNIST dataset and the open-source community for their resources and support.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmansurpro%2Fdigitrecognizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmansurpro%2Fdigitrecognizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmansurpro%2Fdigitrecognizer/lists"}