Waste Detection Project Code
Brought to you by:
liya017
| File | Date | Author | Commit |
|---|---|---|---|
| README.md | 2026-03-13 |
|
[da5177] Updated README |
| app.py | 2026-03-13 |
|
[4df272] Initial commit: waste detection project files |
| create_demo_model.py | 2026-03-13 |
|
[4df272] Initial commit: waste detection project files |
| render.yaml | 2026-03-13 |
|
[4df272] Initial commit: waste detection project files |
| requirements.txt | 2026-03-13 |
|
[4df272] Initial commit: waste detection project files |
Updated project documentation
A web-based garbage classification system using MobileNetV2 transfer learning.
├── app.py # Flask web application
├── requirements.txt # Python dependencies
├── render.yaml # Render.com deployment config
├── model/
│ ├── train_model.py # Training script (use with TrashNet dataset)
│ ├── create_demo_model.py # Creates demo model without dataset
│ └── class_indices.json # Class label mapping
├── templates/
│ └── index.html # Web UI
└── static/
└── uploads/ # Uploaded images
# 1. Create virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/Mac
# 2. Install dependencies
pip install -r requirements.txt
# 3. Generate demo model (skip if you have a trained model)
python model/create_demo_model.py
# 4. Run the app
python app.py
# Visit http://localhost:5000
bash
python model/train_model.pygarbage_model.h5 will be saved in model/pip install -r requirements.txtgunicorn app:app --bind 0.0.0.0:$PORT --workers 1 --timeout 120Note: The
.h5model file is in.gitignore. For deployment, either:
- Remove*.h5from.gitignoreand push the model, OR
- Add a startup script that generates the demo model automatically.