š Waste Recognition Model for Environmental Sustainability
Overview
The Waste Recognition Model is a deep-learning-based solution designed to classify various types of waste materials with high accuracy. By integrating AI-powered waste classification, this project aims to enhance waste management efficiency, reduce environmental pollution, and promote sustainable waste disposal practices.
Key Features
- Accurate Waste Classification: Identifies waste materials across multiple categories.
- Disposal Recommendations: Suggests proper disposal methods to minimize environmental impact.
- Real-Time Processing: Provides quick and efficient waste recognition for seamless integration into waste management systems.
- User-Friendly Interface: Accessible via a web-based application.
- Versatile Deployment: Can be used in homes, offices, and industrial waste management systems.
- Environmental Impact: Reduces contamination and promotes sustainable waste disposal.
Waste Categories
The model is trained to classify waste into the following categories:
- Plastic Waste - Bottles, wrappers, straws, bags.
- Metal Waste - Aluminum, copper, iron, steel.
- Organic Waste - Food waste, yard waste.
- Glass Waste - Bottles, jars, containers.
- Electronic Waste - Computers, phones, appliances.
- Textile Waste - Clothing, fabric materials.
- Medical Waste - Clinical and medical items.
- Wood Waste - Construction wood, furniture.
- Paper Waste - Newspapers, magazines, cardboard.
- Shoes Waste - Footwear and related items.
Technologies Used
- Python
- Fastai
- Gradio
- Hugging Face
- HTML/CSS/JavaScript
- Tailwind CSS
- DaisyUI
š Live Demo
Experience the model in action:
Hugging Face Model Preview
The model demonstrates high accuracy in waste classification with:
- Real-time waste identification
- Appropriate bin recommendations
- Proper disposal guidance
Final Model Accuracy:
epoch train_loss valid_loss error_rate accuracy time
0 0.299003 0.159227 0.046041 0.953959 29:14
epoch train_loss valid_loss error_rate accuracy time
0 0.491925 0.258303 0.073665 0.926335 03:01
Data Preparation
- Dataset Collection: Waste images are gathered from multiple sources, ensuring diverse and well-distributed data.
- Preprocessing: Images undergo resizing, normalization, and augmentation to enhance model generalization.
- Labeling: Data is labeled into predefined categories.
- Splitting: The dataset is divided into training, validation, and testing sets for model evaluation.
Model Training
- Architecture: The model is built using Fastai with a ResNet34 backbone for transfer learning.
- Optimization: Fine-tuned using techniques such as learning rate finder and gradual unfreezing.
- Training: The model undergoes multiple epochs of training to minimize loss and improve accuracy.
- Evaluation Metrics: Accuracy, loss, and confusion matrix are used to assess performance.
Inference
- Model Deployment: The trained model is deployed on Gradio and Hugging Face for easy accessibility.
- User Interaction: Users upload waste images, and the model predicts the waste category and provides disposal guidance.
- Real-Time Testing: The inference pipeline processes new images with minimal latency, making it efficient for practical applications.
Project Structure
WASTE-RECOGNIZER/
āāā app/
ā āāā test_images/ # Sample images for validation
ā āāā app.py # Main application file
ā āāā gradio.png # Application preview image
ā āāā README.md # Application documentation
ā
āāā data/
ā āāā dataloaders/ # Utilities for data handling
ā ā āāā README.md # Documentation for dataloaders
ā āāā README.md # Data-related documentation
ā
āāā docs/
ā āāā images/ # Documentation images
ā āāā .nojekyll # Jekyll configuration
ā āāā index.html # Main webpage content
ā
āāā models/
ā āāā README.md # Documentation for the model
ā
āāā notebook/
ā āāā DataPrep.ipynb # Data preprocessing notebook
ā āāā DataTraining.ipynb # Model training notebook
ā āāā Inference.ipynb # Inference and evaluation notebook
ā
āāā LICENSE # License file
āāā README.md # Project documentation
āāā requirements.txt # Dependencies
Setup Instructions
1ļøā£ Clone the Repository
git clone https://github.com/AuvroIslam/wasteRecognizer.git
cd wasteRecognizer
2ļøā£ Install Dependencies
pip install -r requirements.txt
3ļøā£ Run the Model Locally
cd app
python app.py
4ļøā£ Model Training (Optional)
cd notebook
jupyter notebook
Open and run DataPrep,dataTraining,Inference.ipynb
to train and test the model.
Usage
- Upload an image of waste material.
- The model predicts the waste category.
- It provides disposal recommendations.
Testing
- Use images from
test_images/
to validate model performance.
- Run inference using
DataPrep,dataTraining,Inference.ipynb
for real-world evaluation.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions
We welcome contributions! Feel free to fork the repository and submit a pull request.
For inquiries or collaborations: