This repository contains the implementation of a garbage classification system inspired by the research paper: Deep Learning-based Waste Detection in Natural and Urban Environments. The system achieves efficient and accurate classification of waste into predefined categories using a deep learning approach.
Garbage pollution is a significant environmental challenge, and efficient waste classification is crucial for effective recycling and waste management. This project implements a model based on EfficientNet architecture, which achieves 83% classification accuracy, making it a practical tool for real-world applications such as smart waste bins and urban waste monitoring.
- Deep Learning Backbone: Utilizes EfficientNet for image classification.
- Dataset Integration: Prepares and trains on the Kaggle Garbage Classification dataset.
- Accuracy: Achieves high accuracy with robust performance in diverse environmental conditions.
- Customizable: Easy-to-use training and testing pipelines.
- Python 3.8 or higher
- TensorFlow / PyTorch
- NumPy
- OpenCV (for image preprocessing)
-
Clone this repository:
git clone https://github.com/yourusername/garbage-classification cd garbage-classification
-
Install the dependencies:
pip install -r requirements.txt
-
Download the dataset:
Download the Garbage Classification Dataset from Kaggle: https://www.kaggle.com/datasets/asdasdasasdas/garbage-classification/data. Extract the dataset and place it in the
data/
directory. -
Preprocess the dataset:
python preprocess_data.py --dataset-path data/Garbage\ Classification
Train the EfficientNet model using the provided dataset:
python train.py --dataset-path data/processed --epochs 50 --batch-size 32
Evaluate the trained model on the test set:
python test.py --model-path models/efficientnet_best.pth --dataset-path data/processed
The project uses EfficientNet-B2, chosen for its balance of computational efficiency and accuracy. The architecture includes:
- Pre-trained EfficientNet backbone for feature extraction.
- Fully connected layers for waste category classification.
The Kaggle dataset includes the following waste categories:
- Cardboard
- Glass
- Metal
- Paper
- Plastic
- Trash
These categories are used directly in the model.
- Classification Accuracy: 83% on the test set.
- Dataset Size: The Kaggle dataset contains over 2,500 labeled images of waste.
We welcome contributions! Please follow the steps below to contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m 'Add feature'
). - Push to the branch (
git push origin feature-name
). - Open a pull request.
- Dataset: This project uses the Garbage Classification dataset from Kaggle.
- Research Paper: Inspired by Deep Learning-based Waste Detection in Natural and Urban Environments.