{"id":23126058,"url":"https://github.com/daniel-elston/neural-network-image-classification","last_synced_at":"2025-04-04T05:12:25.297Z","repository":{"id":156363717,"uuid":"481674195","full_name":"Daniel-Elston/Neural-Network-Image-Classification","owner":"Daniel-Elston","description":"MLP deep learning neural network used to classify images from MNIST fashion dataset.","archived":false,"fork":false,"pushed_at":"2022-06-13T10:20:19.000Z","size":525,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T16:36:32.420Z","etag":null,"topics":["data-augmentation","data-engineering","data-science","deep-learning","image-classification","image-recognition","machine-learning","neural-network"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daniel-Elston.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-04-14T16:29:33.000Z","updated_at":"2022-04-23T17:27:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"2672d7cf-af6d-4e1e-b7df-5847ccf62965","html_url":"https://github.com/Daniel-Elston/Neural-Network-Image-Classification","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/Daniel-Elston%2FNeural-Network-Image-Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-Elston%2FNeural-Network-Image-Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-Elston%2FNeural-Network-Image-Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-Elston%2FNeural-Network-Image-Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daniel-Elston","download_url":"https://codeload.github.com/Daniel-Elston/Neural-Network-Image-Classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123099,"owners_count":20887261,"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":["data-augmentation","data-engineering","data-science","deep-learning","image-classification","image-recognition","machine-learning","neural-network"],"created_at":"2024-12-17T08:18:13.928Z","updated_at":"2025-04-04T05:12:25.274Z","avatar_url":"https://github.com/Daniel-Elston.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \n![GitBanner3](https://user-images.githubusercontent.com/98388088/158277311-535b2e53-190e-4060-a383-42e9f308ca75.png)\n\n\u003c/p\u003e\n\u003chr\u003e\n\n\n\u003ch1 align='center'\u003e MNIST Image Classification Using Neural Networks (Pytorch) \u003c/h1\u003e\n\n\u003chr\u003e\n\n\n## Table of contents\n- [Status and Details](#status-and-details)\n- [Technology](#technology)\n- [Introduction](#introduction)\n    - [Project Description](#project-description)\n    - [Objectives](#objectives)\n- [Data Science Methodology](#data-science-methodology)\n    - [Problem Formulation](#problem-formulation)\n    - [Data Engineering Methods](#data-engineering-methods)\n    - [Modeling](#modeling)\n    - [Deployment](#deployment)\n- [Conclusions](#conclusions)\n- [Contributing Members and Contacts](#contributing-members-and-contacts)\n\n\n## Status and Details\n- **Project Status**: [Completed]\n- **Date Coded**: 14/04/22\n- **Link to Raw Data**: [https://archive.ics.uci.edu/ml/machine-learning-databases/00222/](https://www.kaggle.com/datasets/zalando-research/fashionmnist)\n- **Notes**: Classification of MNIST Fashion dataset\n\n\n## Technology\n- **Language**: Python 3.6.9\n- **Libraries**: torch, pandas, numpy, matplotlib, seaborn, scipy, sklearn, einops, random\n- **Set up File**: N/A\n\n\n## Introduction\nThe purpose of this project is to train a neural network to classify images of fashion. Training a machine to identify real world objects is of great interest. Appications include the improvement of self driving cars. If a self driving car can identify certain road signs, for example a 30mph sign, it can adjust its setting accordingly.\n\n\n### Project Description\nThe dataset used for this project was the MNIST Fashion dataset. It is a huge dataset designed specifically for deep learning neural networks. It has 60,000 training images with 10,000 test images. The images are 28x28 greyscale images of 10 variations of fashion items such as t-shirts, shoes etc. The dataset is augmented to quadruple the amount of observations.\n\nUsing Pytorch, a neural network has been trained to identify items of clothing with an accuracy of 88%. Upon analysis of the results, the model has most difficulty distinguishing shirts from other similar items such as t-shirts or pull overs. \n\n\n### Objectives\n- Transform and augment initial dataset.\n- Using Neural Networks, train a model to classify items of clothing from an augmented dataset of 240,000 observations.\n- Identify what the model struggles to classify and why.\n\n\n## Data Science Methodology\nThe below subsections outline the standard methodology of data scientists.\n\n\n### Problem Formulation\nWhen a machine can be trained to identify and classify real world images, it can be extremely beneficial to society. An example of this includes facial recognition for the Iphone. The model must learn your face and identify that it is you in order to unlock the phone. There are many further societal benefits such as the classification of images of cancerous tumours.\n\n\n### Data Engineering Methods\n- **Data Transformation**: Convert image to tensor, flatten tensor to vector form,\n- **Data Preprocessing**: Data augmentation, Split images into patches, image rotation, apply greyscale, normalisation\n- **Data Visualisation**: Each step of data transformation and preprocessing is visualised. Confusion matrix visualised.\n- **Machine Learning**: Deep learning\n\n\n### Modeling \nUsing a variation of the MLP, a model is trained using MNIST Fashion dataset. The dataset is transformed to allow it to be fed to the model. The data is augmented by splitting images in 2 and rotating them by 180 degrees. The resultant dataset is 240,000 observations. The model had an accuracy of 88% which is quite high for this particular dataset.\n\n\n### Deployment\nThe model was deployed on a previously unseen dataset of 24,000 images. The model has an accuracy of 88%, with most of the incorrect classifications coming from the confusion of shirts with t-shirts and pull overs. Without such similar items, I would expect the accuracy to be in the low to mid 90's.\n\n\n## Conclusions\nAn accuracy of 88% is observed with most incorrect classifications coming from the confusion of shirts, t-shirts and pull overs. Without such similar items, it is estimated that the accuracy could be as high as the mid 90's (likely low 90's). This model is not well suited for medicinal classification (such as tumour identification), however the accuracy is high for this particular dataset.  \n\n\n## Contributing Members and Contacts\n**Team Lead: [Daniel Elston](https://github.com/Daniel-Elston)**\n\n|Name     |  GitHub Handles   |  \n|---------|-----------------|\n| Daniel Elston | [Git DE](https://github.com/Daniel-Elston)   |\n\nPlease feel free to contact me if you have any questions, require any further information or wish to contribute.\u003cbr/\u003e\nEmail 1: delstonds@outlook.com\u003cbr/\u003e\nEmail 2: ec21024@qmul.ac.uk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-elston%2Fneural-network-image-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel-elston%2Fneural-network-image-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-elston%2Fneural-network-image-classification/lists"}