An AI-powered waste classification system that uses deep learning to automatically identify and categorize waste materials, promoting efficient recycling and sustainable waste management.
Waste Classification is an intelligent image recognition system designed to automate the sorting of recyclable materials. By leveraging computer vision and deep learning techniques, this application helps users quickly identify whether waste items are recyclable, compostable, or belong to other categories, reducing contamination in recycling streams and promoting environmental sustainability.
- Real-Time Image Classification - Instantly classify waste materials using your device's camera or uploaded images
- Multiple Waste Categories - Recognizes various types of waste including recyclables, organic waste, and general trash
- Deep Learning Powered - Utilizes convolutional neural networks (CNN) for accurate waste recognition
- User-Friendly Interface - Clean React-based frontend for easy interaction
- Fast Processing - Quick inference times suitable for real-time applications
- Educational Tool - Helps users learn proper waste sorting practices
- Framework: React.js
- Language: JavaScript
- Styling: CSS3
- Build Tool: Create React App
- Framework: Flask (Python)
- Machine Learning: TensorFlow/Keras or PyTorch
- Image Processing: OpenCV, PIL
- API: RESTful endpoints for classification
- Architecture: Convolutional Neural Networks (CNN)
- Common Models: ResNet, VGGNet, MobileNet, or custom architectures
- Training: Transfer learning on waste image datasets
- Deployment: Model serving via Flask API
Waste-Classification/
├── frontend/ # React application
│ ├── public/ # Static files
│ ├── src/ # React components and logic
│ │ ├── components/ # Reusable UI components
│ │ ├── App.js # Main application component
│ │ └── index.js # Entry point
│ └── package.json # Frontend dependencies
│
├── backend/ # Flask API server
│ ├── app.py # Main Flask application
│ ├── model/ # Trained ML models
│ ├── utils/ # Helper functions
│ └── requirements.txt # Python dependencies
│
└── README.md
- Node.js 14+ and npm (for frontend)
- Python 3.7+ (for backend)
- A trained waste classification model (or train your own)
git clone https://github.com/nayon0217/Waste-Classification.git
cd Waste-Classificationcd frontend
npm installcd backend
pip install -r requirements.txtCommon backend dependencies might include:
flask
flask-cors
tensorflow
keras
pillow
opencv-python
numpy
cd backend
python app.pyThe Flask server typically runs on http://localhost:5000
In a separate terminal:
cd frontend
npm startThe React application will open at http://localhost:3000
- Upload an Image: Click the upload button to select an image of waste material from your device
- Capture with Camera (if implemented): Use your device's camera to take a photo
- Get Classification: The system processes the image and returns the waste category
- View Results: See the classification result with confidence score and disposal recommendations
Classifies an uploaded waste image.
Request:
{
"image": "<base64_encoded_image>"
}Response:
{
"category": "Recyclable - Plastic",
"confidence": 0.95,
"recommendations": "Place in blue recycling bin"
}Model not loading:
- Ensure the model file is in the correct directory
- Check that the model format matches the loading code
CORS errors:
- Verify Flask-CORS is installed and configured
- Check that backend URL is correctly set in frontend
Low accuracy:
- Ensure good image quality
- Check lighting conditions
- Verify the object is clearly visible
- Consider model retraining with more data