{"id":31579136,"url":"https://github.com/18mahi/digital_cave","last_synced_at":"2026-04-13T04:43:14.638Z","repository":{"id":318059734,"uuid":"1069850095","full_name":"18mahi/digital_cave","owner":"18mahi","description":"An intermediate-level deep learning project that compares Convolutional Neural Networks (CNN) and Multi-Layer Perceptrons (MLP) on the MNIST handwritten digits dataset. This project demonstrates data augmentation, learning rate scheduling, and visual comparison of model performance ","archived":false,"fork":false,"pushed_at":"2025-10-04T19:13:07.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T21:21:59.313Z","etag":null,"topics":["cnn","confusion-matrix","data-augmentation","data-science","deep-learning","evaluation-metrics","jupyter-notebook","keras","learning-rate-scheduler","machine-learning","matplotlib","mlp","numpy","python3","scikit-learn","seaborn","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/18mahi.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T18:37:49.000Z","updated_at":"2025-10-04T19:17:56.000Z","dependencies_parsed_at":"2025-10-04T21:22:00.996Z","dependency_job_id":null,"html_url":"https://github.com/18mahi/digital_cave","commit_stats":null,"previous_names":["18mahi/digital_cave"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/18mahi/digital_cave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Fdigital_cave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Fdigital_cave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Fdigital_cave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Fdigital_cave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/18mahi","download_url":"https://codeload.github.com/18mahi/digital_cave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Fdigital_cave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278518111,"owners_count":26000176,"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-10-05T02:00:06.059Z","response_time":54,"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":["cnn","confusion-matrix","data-augmentation","data-science","deep-learning","evaluation-metrics","jupyter-notebook","keras","learning-rate-scheduler","machine-learning","matplotlib","mlp","numpy","python3","scikit-learn","seaborn","tensorflow"],"created_at":"2025-10-05T20:47:26.196Z","updated_at":"2025-10-05T20:47:31.178Z","avatar_url":"https://github.com/18mahi.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Digit Cave – Handwritten Digit Recognition (CNN vs MLP)\nAn intermediate-level deep learning project that compares Convolutional Neural Networks (CNN) and Multi-Layer Perceptrons (MLP) on the MNIST handwritten digits dataset.\nThis project demonstrates data augmentation, learning rate scheduling, and visual comparison of model performance — ideal for students and developers building a solid foundation in image classification and model optimization.\n\n# 🚀 Project Overview\nThe Digit Cave aims to explore how architectural depth and feature extraction impact performance in handwritten digit recognition.\nTwo models were trained:\n1. 🧩 MLP (Baseline) – Fully connected layers with flattened 28×28 inputs.\n2. 🎯 CNN (Enhanced) – Convolutional and pooling layers for spatial pattern extraction.\nDataset: MNIST Handwritten Digits\nImages: 70,000 grayscale digits (28×28 px)\n\n# ⚙️ Features Implemented\n✅ Model comparison: CNN vs MLP\n📈 Data augmentation (rotation, shift, zoom)\n🔁 Learning rate scheduler (ReduceLROnPlateau)\n🧮 Accuracy, loss, and confusion matrix visualizations\n🔍 Evaluation metrics: precision, recall, F1-score\n🖼️ Sample prediction visualization\n\n# 🧩 Model Architecture\n## CNN\n- 2 Conv2D layers (ReLU + MaxPooling)\n- Dropout regularization\n- Dense(128) → Output(10, softmax)\n\n## MLP\n- Flatten input → Dense(512) → Dropout → Output(10, softmax)\n\n# 📊 Results and Comparison\n\u003cimg width=\"962\" height=\"209\" alt=\"image\" src=\"https://github.com/user-attachments/assets/578ff834-4b61-45e6-bf19-5d3b75d7bd91\" /\u003e\n\n# 📉 Performance Visualization\n## Training vs Validation Accuracy\n\n\u003cimg width=\"413\" height=\"391\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6083a0ca-9bda-4598-ac65-93d8dbc25e63\" /\u003e\n\n## Training vs Validation Loss\n\n\u003cimg width=\"439\" height=\"387\" alt=\"image\" src=\"https://github.com/user-attachments/assets/063df650-dfc2-4061-ba04-5fc51d03601c\" /\u003e\n\n## Confusion Matrix (CNN)\n\n\u003cimg width=\"546\" height=\"444\" alt=\"image\" src=\"https://github.com/user-attachments/assets/116d33bc-b487-49b3-8974-748acd2da188\" /\u003e\n\n# 🧠 Insights\n- CNNs significantly outperform MLPs in spatial recognition tasks like MNIST.\n- Data augmentation improves generalization and prevents overfitting.\n- ReduceLROnPlateau dynamically lowers the learning rate, stabilizing convergence.\n- Even small CNN architectures can achieve \u003e99% accuracy on MNIST with tuning.\n\n# 🧰 Tech Stack\n- Language: Python 3.x\n- Frameworks: TensorFlow / Keras\n- Libraries: NumPy, Matplotlib, Seaborn, Scikit-learn\n- Environment: Jupyter Notebook\n\n# 📦 How to Run\n## Clone this repo:\ngit clone https://github.com/18mahi/digital_cave.git\n-cd  Digit-Cave\n\n## Install dependencies:\npip install -r requirements.txt\n\n### 🧾 requirements.txt\nCreate a file named requirements.txt in your project folder with the following content:\n- tensorflow==2.16.1\n- numpy==1.26.4\n- matplotlib==3.9.0\n- seaborn==0.13.2\n- scikit-learn==1.5.0\n- pandas==2.2.2\n- jupyter==1.1.0\n\n## Run the notebook:\njupyter notebook Digit_Cave.ipynb\n\n# 🏁 Future Improvements\n- Add deeper CNNs (LeNet, VGG-style)\n- Experiment with dropout rates and batch normalization\n- Deploy via Streamlit for interactive digit recognition\n\n# 🧑‍💻 Author\nMahi Jindal\n🎓 CSE (AI/ML) | Passionate about Deep Learning \u0026 Robotics\n🌐 LinkedIn-https://www.linkedin.com/in/mahi-jindal-867109245/\n • GitHub- https://github.com/18mahi\n\n# 📄 License\nThis project is open-source under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18mahi%2Fdigital_cave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F18mahi%2Fdigital_cave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18mahi%2Fdigital_cave/lists"}