A deep learning based application that classifies waste images into different categories and helps promote efficient recycling using Artificial Intelligence.
Built as part of my learning journey during the Edunet Foundation Internship and later upgraded with a production-ready ML pipeline.
Waste management is an important environmental challenge.
This project uses Deep Learning and Computer Vision to automatically classify garbage images into different waste categories.
The system allows users to upload an image of waste material, analyzes it using a trained AI model, and predicts the category along with a confidence score and recycling suggestion.
🔗 Application Link:
https://garbage-classifier-vk18.streamlit.app/
✔️ Upload garbage images
✔️ AI-based waste classification
✔️ Confidence score visualization
✔️ Recycling suggestions
✔️ Fast prediction system
✔️ Clean Streamlit user interface
✔️ REST API support using FastAPI
The model classifies waste into 6 categories:
| Category | Description |
|---|---|
| 📦 Cardboard | Boxes, packaging material |
| 🍾 Glass | Glass bottles/items |
| 🔩 Metal | Cans, metallic waste |
| 📄 Paper | Paper waste |
| 🧴 Plastic | Plastic bottles/items |
| 🗑️ Trash | General waste |
The first version of this project used a basic CNN model, but it struggled with real-world images.
The upgraded version uses:
Architecture:
Input Image
|
↓
Image Augmentation
|
↓
MobileNetV2 Feature Extractor
|
↓
Global Average Pooling
|
↓
Dropout Layer
|
↓
Softmax Classifier
|
↓
Waste Category
Final Model Accuracy:
Training Accuracy : 86%+
Validation Accuracy : 86.34%
Improvements:
- Better generalization
- Real-world image support
- Transfer learning
- Strong image augmentation
- Python
- TensorFlow
- Keras
- MobileNetV2
- Transfer Learning
- FastAPI
- Uvicorn
- Streamlit
- HTML/CSS
- Streamlit Cloud
Garbage-Classifier-Project/
│
├── backend/
│ ├── main.py
│ ├── predict.py
│ └── requirements.txt
│
├── frontend/
│ ├── app.py
│ └── streamlit_app.py
│
├── model/
│ ├── model.keras
│ └── label_map.json
│
├── notebooks/
│ └── training.ipynb
│
├── utils/
│ └── preprocessing.py
│
├── extra/
│ └── screenshots/
│
├── requirements.txt
├── README.md
└── .gitignore
Clone repository:
git clone https://github.com/deepakjha018/Garbage_Classifier_Project.gitMove into project:
cd Garbage_Classifier_ProjectInstall dependencies:
pip install -r requirements.txtRun Streamlit app:
streamlit run frontend/streamlit_app.pyStart FastAPI server:
cd backend
uvicorn main:app --reloadAPI endpoint:
POST /predict
Upload an image and receive:
{
"prediction":"plastic",
"confidence":95.6
}- Add more waste categories
- Improve dataset diversity
- Add object detection support
- Create mobile application
- Deploy FastAPI separately
This project was initially developed during:
Edunet Foundation Internship Program
Later enhanced with:
- Transfer Learning
- Improved ML pipeline
- Better UI
- Deployment-ready architecture
Deepak Kumar Jha
AI & Data Science Student
Passionate about Machine Learning, Data Science, and AI-powered solutions.
⭐ If you like this project, consider giving it a star!






