The Waste Management System (WMS) is an AI-powered waste classification platform that classifies waste as Bio-Degradable or Non-Bio-Degradable using Deep Learning.
It includes real-time image classification, video waste analysis, waste tracking, data visualization, chatbot assistance, and automated reporting for an eco-friendly waste disposal approach.
✅ Real-time Waste Classification – Predicts waste type using an AI model
✅ Webcam-based Detection – Classify waste using a live camera feed
✅ Video Waste Processing – Extracts frames and classifies waste in videos
✅ Interactive Dashboard – Displays waste trends, analytics & reports
✅ PDF & CSV Reports – Download waste reports in multiple formats
✅ Google Sheets & Drive Integration – Auto-stores data & uploads files
✅ AI Chatbot Assistance – Answers waste-related queries dynamically
✅ Email Notifications – Send waste classification reports via email
✅ RESTful API – Provides endpoints for classification, statistics & reports
🔹 Frontend: React.js, Material-UI, Framer Motion, Chart.js, React Webcam
🔹 Backend: Flask, TensorFlow, Keras, OpenCV
🔹 Database: MySQL
🔹 Visualization: ReportLab, Matplotlib
🔹 Email Notifications: SMTP, Python Email API
Ensure you have the following installed:
🟢 Python 3.9
🟢 Node.js 16+
Check your Python version:
python --versionCheck your Node.js version:
node -vIf missing, download from:
git clone https://github.com/Jerophin123/waste-management-system.git
cd waste-management-systemCreate a virtual environment:
python3.9 -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # WindowsInstall dependencies:
pip install -r requirements.txtStart the Flask backend:
python backend.pyThe server runs at http://127.0.0.1:5000/.
Navigate to the frontend folder:
cd frontend
npm install
npm startThe React app runs at http://localhost:3000/.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/predict |
Upload an image and classify waste |
POST |
/api/realtime_predict |
Predict waste in real-time from webcam |
POST |
/api/predict_video |
Upload a video and classify frames |
GET |
/api/stats |
Get waste classification statistics |
GET |
/api/trends |
Get monthly waste trends |
POST |
/api/send_report |
Send waste classification reports via email |
GET |
/api/download_report |
Download a structured PDF waste report |
GET |
/api/download_logs |
Download waste classification logs as CSV |
Create a .env file in the root directory and add the following:
# 📩 SMTP Email Configuration
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
EMAIL_SENDER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password
# 📊 Google Sheets & Drive Integration
GOOGLE_SHEETS_CREDS=credentials.json
GOOGLE_DRIVE_CREDS=drive_credentials.json
PARENT_FOLDER_ID=your-folder-id
FOLDER_BIO=bio-folder-id
FOLDER_NONBIO=nonbio-folder-id
# 🔌 MySQL Database Configuration
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=your-password
MYSQL_DB=waste_managementThe chatbot provides:
✅ System Overview & Features
✅ Waste Classification Guide
✅ Live Waste Data Retrieval
✅ PDF & CSV Report Downloads
✅ Smart Waste Disposal Tips
✅ Email Notifications & Troubleshooting
Activate chatbot via the floating 💬 Chat Icon in the app.
Use Gunicorn for production:
gunicorn -w 4 -b 0.0.0.0:5000 backend2:appUse NGINX as a reverse proxy for Flask.
Use Vercel / Netlify / Firebase Hosting:
npm run buildThen deploy the frontend/build folder.
- Go to the Prediction Page.
- Upload an image or Enter a Google Drive link.
- Click Predict.
- AI classifies the waste & shows confidence scores.
- If an email is provided, the classification result will be sent to your email.
- Switch to Camera Mode.
- Select the desired camera device.
- Click Start Real-Time to begin predictions in real-time.
- Click capture button to capture waste image.
- AI classifies the waste & shows confidence scores.
- If an email is provided, the classification result will be sent to your email.
- Upload a video file or provide a Google Drive link.
- Click Predict and wait for frame extraction.
- View the classified frames in the results dialog.
- If an email is provided, the classification result will be sent to your email.
- Dashboard → View live statistics & waste trends.
- Logs Page → View past waste records.
- Reports → Download CSV or PDF reports.
- Email Reports → Send reports via email.
✔ AI-powered Waste Classification
✔ Optimized for Speed & Accuracy
✔ Real-time Predictions & Trend Analysis
✔ Data Storage in Google Sheets & Drive
✔ Automated Email Reports
✔ User-friendly Chatbot Integration
✔ Dark & Light Mode Theming
📝 This project is licensed under the MIT License – feel free to use and modify!
If you like this project, don’t forget to 🌟 star the repository on GitHub! 🚀
Together, we can make waste management smarter & eco-friendly! ♻️