🗑️ An intelligent waste management solution using IoT sensors, machine learning, and route optimization.
- Real-time Monitoring: Track fill levels across all smart bins
- Waste Classification: AI-powered image and audio classification
- Route Optimization: Efficient collection routes using OR-Tools
- Anomaly Detection: Identify illegal dumping and sensor malfunctions
- CO2 Tracking: Monitor environmental impact and sustainability metrics
# Clone the repository
git clone https://github.com/yourusername/smartbin.git
cd smartbin
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run the dashboard
streamlit run app.pySMARTBIN/
├── app.py # Streamlit dashboard
├── requirements.txt # Python dependencies
├── .streamlit/
│ └── config.toml # Streamlit configuration
├── simulate_bin_events.py # IoT event simulator
├── waste_classifier.py # MobileNetV2 image classifier
├── audio_pipeline.py # Mel-spectrogram extraction
├── audio_classifier.py # CNN audio classifier
├── multimodal_fusion.py # Image+audio fusion model
├── fill_level_predictor.py # LSTM fill prediction
├── anomaly_detector.py # Anomaly detection system
├── route_optimizer.py # Collection route optimization
├── data/
│ ├── smart_bin_events.csv
│ ├── detected_anomalies.json
│ └── route_data.json
└── models/
└── [trained models]
Generates realistic smart bin events with fill levels, waste types, and sensor data.
- Image: MobileNetV2 transfer learning (5 classes)
- Audio: CNN with Mel-spectrograms
- Fusion: Late fusion combining both modalities
LSTM model predicting bin overflow 12 hours ahead based on historical patterns.
Rule-based and statistical detection of:
- Illegal dumping (fill jumps >15%)
- Sensor malfunction
- Audio-image mismatch
- Greedy nearest-neighbor algorithm
- OR-Tools VRP solver
- Interactive map visualization
- Push code to GitHub
- Go to share.streamlit.io
- Connect your repository
- Set main file:
app.py - Deploy!
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8501
CMD ["streamlit", "run", "app.py"]from anomaly_detector import AnomalyDetector
detector = AnomalyDetector()
anomalies = detector.detect_anomalies({
"bin_id": "BIN_001",
"fill_level": 95,
"timestamp": "2026-01-05T10:30:00"
})from route_optimizer import RouteOptimizer, Bin
optimizer = RouteOptimizer()
bins = [Bin("BIN_001", 12.97, 77.59, 85)]
route = optimizer.optimize_route(bins)
print(f"Distance: {route.total_distance_km} km")| Variable | Description | Default |
|---|---|---|
DEPOT_LAT |
Depot latitude | 12.9716 |
DEPOT_LON |
Depot longitude | 77.5946 |
FILL_THRESHOLD |
Collection threshold | 60 |
- Fork the repository
- Create a feature branch
- Commit changes
- Push to branch
- Open a Pull Request
MIT License - see LICENSE for details.
- TrashNet dataset for waste images
- OR-Tools by Google for optimization
- Streamlit for the dashboard framework