Waste management is one of the biggest urban challenges, and manual garbage sorting is slow, costly, and prone to errors. This project uses a Convolutional Neural Network (CNN) to automatically classify images of waste into predefined categories, enabling faster and more efficient waste segregation. The goal is to help recycling facilities, environmental initiatives, and researchers explore how deep learning can be applied to sustainability challenges.
- Image classification into multiple waste categories using CNNs.
- Data preprocessing with image resising, normalisation, and augmentation.
- Model training and evaluation in a reproducible Jupyter Notebook.
- Confusion matrix and accuracy metrics for performance evaluation.
- Easy to adapt for new waste categories by retraining on a custom dataset.
- Expected input: Images of garbage items organized into class folders.
- Dataset should be structured for supervised image classification (train/test split).
- Images are read, resized, and normalized before being passed to the CNN.
- If dataset is not available locally, download from a waste classification dataset source (e.g., Kaggle) and place it into the
data/directory.
Arindam's_CNN_Garbage_Classifier.ipynb— main Jupyter notebook containing the entire workflow.README.md— this file.- (Optional)
data/— dataset files (kept out of version control by default). - (Optional)
models/— saved trained models.
Prerequisites:
- Python 3.8+
- pip (or conda)
- Jupyter Notebook/Lab
Create and activate a virtual environment (recommended):
python -m venv .venv
# Linux/Mac
source .venv/bin/activate
# Windows
.venv\Scripts\activateInstall dependencies:
pip install -U pip
pip install jupyter tensorflow keras numpy pandas matplotlib seaborn scikit-learnLaunch Jupyter:
jupyter notebookOpen Arindam's_CNN_Garbage_Classifier.ipynb.
- Ensure your dataset is available locally and structured properly for image classification.
- Update the dataset path in the notebook if necessary.
- Run all cells in sequence:
- Imports
- Data loading and preprocessing
- Model definition (CNN architecture)
- Training
- Evaluation
- Review metrics such as accuracy, loss curves, and confusion matrix.
- Dataset path: edit the path variable in the notebook.
- CNN parameters: adjust number of filters, kernel size, dropout, and dense layers as needed.
- Training parameters: modify batch size, epochs, and learning rate for tuning.
- CNN achieves strong accuracy in classifying waste categories.
- Visualization of accuracy and loss trends helps monitor training progress.
- Confusion matrix highlights strengths and weaknesses for each category.
Ideas to improve:
- Add more diverse data for better generalization.
- Implement transfer learning with pre-trained models like ResNet or MobileNet.
- Use real-time inference with a camera feed.
Contributions welcome:
- Fork the repo and create a feature branch.
- Follow PEP8; add docstrings/comments.
- Include notes/results/tests where relevant.
- Open a pull request describing changes and motivation.
MIT License (recommended). Add a LICENSE file to the repository.
Completed during a Data Science and AI training program at Internselite.
Special thanks to my mentor, Ayush Srivastava, for guidance and support.
Libraries: pandas, numpy, scikit-learn, seaborn, matplotlib, tensorflow, keras.
Author: Arindam Deka
Email: arindamdeka001@gmail.com
GitHub: ArindamDeka09
Issues: Please open an issue with details and steps to reproduce.