https://github.com/aidinhamedi/pytorch-garbage-classification-v2

A Pytorch project for garbage classification using the EfficientNet-B6 model to achive a 95.78% accuracy on the test set. 😊

https://github.com/aidinhamedi/pytorch-garbage-classification-v2

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • β—‹
    CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • β—‹
    .zenodo.json file
  • β—‹
    DOI references
  • βœ“
    Academic publication links
    Links to: arxiv.org
  • β—‹
    Academic email domains
  • β—‹
    Institutional organization owner
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary

Keywords

ai artificial-intelligence classification computer-science computer-vision convolutional-neural-networks deep-learning example-project garbage-classification machine-learning python python3 pytorch template
Last synced: 6 months ago · JSON representation

Repository

A Pytorch project for garbage classification using the EfficientNet-B6 model to achive a 95.78% accuracy on the test set. 😊

Basic Info
  • Host: GitHub
  • Owner: AidinHamedi
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 62.7 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
ai artificial-intelligence classification computer-science computer-vision convolutional-neural-networks deep-learning example-project garbage-classification machine-learning python python3 pytorch template
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Garbage Classification V2 with PyTorch

License: MIT Ruff

A Pytorch project for garbage classification using the EfficientNet-B6 model to achieve a 95.78% accuracy on the test set.

[!IMPORTANT] This project is a new version of the original project, which can be found here but with a significantly improved training process + code and a different dataset.

πŸ˜‰ Bonus

This project is not hard coded for this specific dataset, so it can be used for any image classification task and it has all the necessary tools to train a model from scratch and more. (I will make a pytorch classification template soon)

πŸ“¦ Release

Newest release πŸ“ƒ

Go to newest release

πŸ“‚ Dataset

The dataset used for this project is the Garbage Classification from Kaggle. It contains images of garbage, divided into six categories.

Data Structure

~~~ β”œβ”€β”€β”€Database β”‚ └───Data # Put all the folders with images here

Example ⬎

β”‚ β”œβ”€β”€β”€battery β”‚ β”œβ”€β”€β”€biological β”‚ β”œβ”€β”€β”€brown-glass β”‚ ... β”‚ └───white-glass ~~~

πŸ§ͺ Model

I used the EfficientNet-B6 model for this project. EfficientNet-B6 is a convolutional neural network that is pretrained on the ImageNet dataset. It is known for its efficiency and high performance on a variety of image classification tasks. Original paper

πŸ”° Installation

To run the code in this repository, you will need to install the required libraries. You can do this by running the following command:

bash pip install -r requirements.txt

[!WARNING] The requirements are auto generated by pipreqs and may not contain all the necessary dependencies. like hidden ones like Tensorboard.

πŸš€ Usage

The main code for this project is in a Jupyter notebook named Main.ipynb. To run the notebook, use the following command:

bash jupyter notebook Main.ipynb

πŸ“ƒ Results

| Metric | Value | |----------------------------------|-----------| | Loss | 0.0330466 | | F1 Score (macro) | 0.95472 | | Precision (macro) | 0.952111 | | Recall (macro) | 0.957959 | | AUROC | 0.993324 | | Accuracy | 0.957839 | | Cohen's Kappa | 0.948292 | | Matthews Correlation Coefficient | 0.948374 |

alt text alt text

πŸ“š License

 Copyright (c) 2024 Aydin Hamedi
 
 This software is released under the MIT License.
 https://opensource.org/licenses/MIT

Owner

  • Name: Aidin
  • Login: AidinHamedi
  • Kind: user

Segmentation fault

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • Pillow *
  • colorama *
  • efficientnet_pytorch *
  • matplotlib *
  • numba *
  • numpy *
  • opencv_python *
  • pytorch_optimizer *
  • scikit_learn *
  • seaborn *
  • tabulate *
  • timm *
  • torch *
  • torchcam *
  • torchinfo *
  • torchvision *
  • tqdm *