Skip to content

Litter detection and classification system that uses computer vision and deep learning to identify different types of waste from real-world images.

Notifications You must be signed in to change notification settings

vansh070605/LitterVision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚮 LitterVision


🌍 Live Demo

🔗 https://litter-vision.onrender.com

⚠️ Free hosting may take ~30 seconds to wake up (cold start)


📌 About the Project

LitterVision is an AI-powered litter detection and classification system that uses computer vision and deep learning to identify different types of waste from real-world images.

The system helps quantify litter severity and provides environmental guidance, making it suitable for urban cleanliness and smart city initiatives.


🧠 Problem Statement

Improper waste disposal is a major contributor to urban pollution. Manual monitoring of litter is inefficient and costly.

Solution:
An automated computer vision system that can:

  • Detect litter presence
  • Classify waste type
  • Quantify cleanliness level
  • Assist urban cleanliness decision-making

⚙️ Tech Stack

Layer Technology
Frontend HTML, CSS (Glassmorphism UI)
Backend Flask
ML Model MobileNetV2 (Transfer Learning)
Framework TensorFlow / Keras
Deployment Render (Gunicorn)

🧪 Features

✅ Image-based litter classification
✅ Camera capture support (mobile-friendly)
✅ Confidence score with animated bar
✅ Cleanliness severity quantification
✅ Environmental tips based on litter type
✅ Modern animated UI
✅ Deployed with public URL


🗂️ Litter Categories

  • 🟫 Cardboard
  • 🟦 Glass
  • 🔩 Metal
  • 📄 Paper
  • 🧴 Plastic
  • 🗑️ Trash

📊 Cleanliness Quantification Logic

Confidence Score Cleanliness Level
0–30% 🟢 Clean Area
31–70% 🟡 Moderately Polluted
71–100% 🔴 Highly Polluted

This satisfies litter quantification for urban cleanliness analysis.


📸 Application Flow

User uploads image / uses camera
        ↓
Image preprocessing
        ↓
Deep Learning Model (MobileNetV2)
        ↓
Prediction + Confidence
        ↓
Cleanliness Score + Environmental Tip

🚀 Deployment

The application is deployed on Render (Free Tier) using:

gunicorn app:app --workers 1 --threads 1 --timeout 120

Optimized for low-memory cloud environments using:

  • CPU-only inference
  • Lazy model loading

🧠 Viva / Interview Explanation

“LitterVision is a computer vision–based system that classifies litter from real-world images and quantifies cleanliness levels using confidence-based severity scoring, supporting urban cleanliness initiatives.”


📁 Project Structure

LitterVision/
│
├── app.py
├── train.py
├── model.h5
├── requirements.txt
├── templates/
│   └── index.html
├── static/
│   └── uploads/
│       └── favicon_io/
├── Dataset/
│   ├── cardboard/
│   ├── glass/
│   ├── metal/
│   ├── paper/
│   ├── plastic/
│   └── trash/
└── README.md

🛠️ How to Run Locally

pip install -r requirements.txt
python app.py

Open:

http://127.0.0.1:5000

🌱 Future Enhancements

  • Bounding-box litter detection (YOLO)
  • Prediction history dashboard
  • Area-wise cleanliness analytics
  • Grad-CAM explainability
  • Mobile app integration

👨‍💻 Author

Vansh Agrawal Engineering Student | AI & ML Enthusiast

🔗 GitHub: https://github.com/vansh070605

⭐ If you like this project, consider starring the repo!

About

Litter detection and classification system that uses computer vision and deep learning to identify different types of waste from real-world images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published