AI-powered waste detection, profit estimation, and environmental impact analysis
Transforming how the world manages waste — one image at a time.
WasteVision is a full-stack AI application that:
- 📸 Detects and classifies waste in uploaded images using a custom-trained YOLOv8 model
- 💰 Estimates scrap profit based on detected material types (plastic, metal, paper, glass)
- 🌍 Calculates environmental impact — CO₂ saved, water conserved, energy recovered, trees saved
- 📍 Finds nearby recycling centres and scrap dealers using OpenStreetMap / Overpass API
- 🚛 Manages pickup requests with a dealer dashboard for accepting/rejecting orders
WasteVision/
│
├── backend/ # Flask REST API (Python)
│ ├── app.py # Main application — all routes & logic
│ ├── requirements.txt # Python dependencies
│ └── uploads/ # Runtime image uploads (gitignored)
│
├── frontend/ # Next.js 16 Web Application (TypeScript)
│ ├── app/ # App Router pages
│ │ ├── layout.tsx # Root layout + theme provider
│ │ ├── page.tsx # Main app entry (sidebar shell)
│ │ ├── globals.css # Global styles + design tokens
│ │ └── dealer/
│ │ └── page.tsx # Dealer dashboard page
│ ├── components/ # React components
│ │ ├── hero-section.tsx # Landing hero with stats + animations
│ │ ├── upload-section.tsx # Image upload + preview
│ │ ├── results-dashboard.tsx # Detection results display
│ │ ├── lower-sections.tsx # Analytics, disposal plan
│ │ ├── nearby-dealers.tsx # OSM map + dealer finder
│ │ ├── dealer-dashboard.tsx # Dealer pickup management
│ │ ├── history-section.tsx # Past analyses
│ │ ├── app-sidebar.tsx # Navigation sidebar
│ │ ├── navbar.tsx # Top navigation bar
│ │ ├── footer.tsx # Footer component
│ │ ├── theme-provider.tsx # Dark/light mode
│ │ └── ui/ # shadcn/ui component library
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions
│ ├── public/ # Static assets & icons
│ ├── styles/ # Additional global styles
│ ├── next.config.mjs
│ ├── package.json
│ └── tsconfig.json
│
└── model/ # AI model weights
├── best.pt # Custom YOLOv8 weights (download separately — see model/README.md)
└── README.md # Model info & download instructions
- Python 3.11+
- Node.js 18+
npmorpnpm
git clone https://github.com/your-username/WasteVision.git
cd WasteVisionSee
model/README.mdfor the download link.
Placebest.ptin themodel/directory.
cd backend
pip install -r requirements.txt
python app.pyThe backend will start at http://localhost:5000
cd frontend
npm install
npm run devThe frontend will start at http://localhost:3000
Open your browser and go to http://localhost:3000 🚀
Base URL: http://localhost:5000
| Method | Endpoint | Description |
|---|---|---|
POST |
/analyze |
Upload a waste image, get detection results |
POST |
/upload |
Alias for /analyze |
GET/POST |
/osm_locations |
Find nearby recycling centres (OpenStreetMap) |
POST |
/request_pickup |
Submit a pickup request |
GET |
/pickup_requests |
List all pickup requests (dealer view) |
POST |
/accept_pickup |
Dealer accepts a pickup request |
POST |
/reject_pickup |
Dealer rejects a pickup request |
POST |
/complete_pickup |
Mark a pickup as completed |
POST |
/dealer_login |
Dealer authentication |
curl -X POST http://localhost:5000/analyze \
-F "file=@your_waste_image.jpg"Response:
{
"objects": { "plastic": 3, "metal": 1 },
"profit": 110,
"carbon_saved": 0.19,
"water_saved": 13.4,
"energy_saved": 1.0,
"trees_saved": 0.0,
"score": 100,
"grade": "green",
"suggestions": ["✅ Excellent segregation! Keep it up for maximum profit."],
"recommendations": ["♻️ Send plastic to recycling center", "💰 Sell metal to scrap dealer"],
"confidence": "High",
"is_waste": true
}- Architecture: YOLOv8n (nano — fast inference)
- Training Dataset: TACO (Trash Annotations in Context)
- Detected Classes: Bottle, Bottle cap, Plastic bag, Cup, Straw, Styrofoam, Can, Aluminium foil, Carton, Paper, Broken glass
| Category | Items Detected | Value (₹/item) |
|---|---|---|
| 🧴 Plastic | Bottle, Bag, Cup, Straw, Styrofoam | ₹20 |
| 🥫 Metal | Can, Aluminium foil | ₹50 |
| 📄 Paper | Carton, Paper | ₹10 |
| 🪟 Glass | Broken glass | ₹30 |
WasteVision uses 100% free & open-source mapping:
- Nominatim — Geocoding (city name → lat/lon)
- Overpass API — Finding nearby recycling & scrap facilities
- OpenStreetMap — Map tiles and links
No API keys required!
| Layer | Technology |
|---|---|
| AI / ML | YOLOv8 (Ultralytics), PyTorch |
| Backend | Python 3.11, Flask 3.1, Flask-CORS |
| Frontend | Next.js 16, TypeScript, Tailwind CSS |
| UI Components | shadcn/ui, Radix UI |
| Maps | OpenStreetMap, Nominatim, Overpass API |
| Styling | CSS Modules, Tailwind, custom cyberpunk theme |
- Fork the repo
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.