{"id":22845184,"url":"https://github.com/shlok-nahar/mnist-cnn-classifier","last_synced_at":"2026-04-13T10:31:01.415Z","repository":{"id":267465343,"uuid":"901253304","full_name":"Shlok-Nahar/mnist-cnn-classifier","owner":"Shlok-Nahar","description":"This repository trains and evaluates three CNN models on MNIST, providing performance comparisons and 5 unique visualizations.","archived":false,"fork":false,"pushed_at":"2024-12-27T19:30:19.000Z","size":38360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T09:47:51.663Z","etag":null,"topics":["confusion-matrix","graph","heatmap-visualization","json","machine","matplotlib","mnist","numpy","precision-recall","python","receiver-operating-characteristic","seaborn","sklearn","tensorflow"],"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/Shlok-Nahar.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-10T10:16:55.000Z","updated_at":"2024-12-27T19:30:23.000Z","dependencies_parsed_at":"2024-12-27T20:33:42.166Z","dependency_job_id":null,"html_url":"https://github.com/Shlok-Nahar/mnist-cnn-classifier","commit_stats":null,"previous_names":["shlok-nahar/minst-cnn-classifier","shlok-nahar/mnist-cnn-classifier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shlok-Nahar%2Fmnist-cnn-classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shlok-Nahar%2Fmnist-cnn-classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shlok-Nahar%2Fmnist-cnn-classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shlok-Nahar%2Fmnist-cnn-classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shlok-Nahar","download_url":"https://codeload.github.com/Shlok-Nahar/mnist-cnn-classifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246421034,"owners_count":20774428,"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":["confusion-matrix","graph","heatmap-visualization","json","machine","matplotlib","mnist","numpy","precision-recall","python","receiver-operating-characteristic","seaborn","sklearn","tensorflow"],"created_at":"2024-12-13T03:15:59.546Z","updated_at":"2025-12-30T23:15:20.679Z","avatar_url":"https://github.com/Shlok-Nahar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MNIST-CNN-Classifier\n\nThis repository contains Python scripts for analyzing the performance of `three CNN models` trained on the MNIST dataset. It includes functionality to evaluate and compare models using training and testing metrics.\n\n## Features\n\n- **3 CNN Models**: There are 3 CNN models with a varied combination of activation and evaluation functions. \n- **Comparison Table**: Outputs a clean table comparing training and testing accuracy and loss for each model.\n- **Model Histories**: Reads training histories saved as JSON files.\n- **Extensible**: Easily add more models by updating the `history_files` dictionary.\n\n## How to Use\n\n**Run main.py**: To train the models.\n\n```bash\npython main.py\n```\n**Run summary.py**: The table will be printed to the console:\n```bash\npython summary.py\n```\n\n```\nModel Performance Comparison\n==================================================\nModel               Metric    Train     Test      \n--------------------------------------------------\nmodel_relu          Accuracy  0.9943    0.9877    \n                    Loss      0.0178    0.0530    \nmodel_leaky_relu    Accuracy  0.9937    0.9883    \n                    Loss      0.0049    0.0083    \nmodel_elu           Accuracy  0.9938    0.9876    \n                    Loss      0.0183    0.0504  \n```\n\n**Run visualise.py**: There are 5 types of visualisations in the Visualisations folder:\n```bash\npython visualise.py\n```\n- Confusion Matrix\n- Graphs\n- Layer-wise Heatmaps (purely for showcasing)\n- Precision-Recall\n- ROC (Receiver Operating Characteristic)\n\n![image](https://github.com/user-attachments/assets/f042ba92-23fd-497c-a0e5-9a3a79425f0d)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlok-nahar%2Fmnist-cnn-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshlok-nahar%2Fmnist-cnn-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlok-nahar%2Fmnist-cnn-classifier/lists"}