Inspiration
Every year, millions of tons of recyclable materials end up in landfills because people don't know how to properly sort their waste. Standing at the recycling bin with a yogurt container in hand, asking "does this go in recycling or trash?"we've all been there. We wanted to create a solution that makes recycling as simple as taking a photo. No more confusion, no more guessing, just instant answers.
What it does
EcoSnap is an AI-powered recycling assistant that turns your camera into an eco-friendly expert:
- ๐ธ Snap a photo of any waste item (or upload from your gallery)
- ๐ค AI classifies it into one of 12 waste categories using deep learning
- โป๏ธ Get instant instructions on how to properly dispose of it
- ๐ Track your history to review past scans and build better habits
- ๐ฏ Smart fallback - when the AI isn't confident, you can manually select from common items
- ๐พ Auto-improves - collects data to make the model smarter over time
Categories include: recyclables (glass, cardboard, metal, paper, plastic), compostables (biological waste), donatables (clothes, shoes), and landfill items (batteries, trash).
How we built it
Frontend Magic โจ
- Built with Next.js 15 and TypeScript for a blazing-fast, type-safe web app
- Styled with Tailwind CSS for a beautiful, responsive design that works on any device
- Implemented client-side camera capture and localStorage for instant history tracking
- Created intuitive UI flows for both high and low confidence predictions
Backend Power ๐
- FastAPI server for high-performance API endpoints
- Keras/TensorFlow for real-time ML model inference
- Automated data collection pipeline that organizes uploaded images by category for future model improvements
- RESTful endpoints for prediction and manual item lookup
Machine Learning ๐ง
- Pre-trained deep learning model that recognizes 12 distinct waste categories
- Image preprocessing pipeline that handles various formats, resolutions, and orientations
- Confidence scoring system to gracefully handle uncertain predictions
- Classification into 4 disposal types: recyclable, compostable, donatable, and landfill
Deployment ๐
- Backend hosted on Render for reliable, scalable API access
- Frontend deployed on Vercel with automatic deployments
- End-to-end HTTPS for secure image transmission
- Sub-second prediction times for real-time user experience
Challenges we ran into
1. Handling uncertainty gracefully ๐ค
The model sometimes couldn't confidently identify obscure or ambiguous items. Rather than giving users potentially wrong information, we built a smart fallback system where users can manually select from a dropdown of common items when confidence is low (< 50%).
2. Image preprocessing pipeline ๐ท
Different cameras produce wildly different image qualitiesโvarying resolutions, orientations, formats (JPEG, PNG, HEIC), and color spaces. We had to implement robust preprocessing that normalizes all inputs while preserving the features needed for accurate classification.
3. Real-time performance โก
Balancing model accuracy with response time was tricky. We optimized image resizing, experimented with different batch sizes, and streamlined the prediction pipeline to achieve sub-second classifications without sacrificing accuracy.
4. Cross-origin complexity ๐
Handling image data flow between frontend and backend required careful CORS configuration, base64 encoding strategies, and multipart form data handling to ensure smooth uploads from any browser.
Accomplishments that we're proud of
โจ 12 comprehensive waste categories with specific, actionable disposal instructions tailored to each item type
โจ Beautiful, intuitive UI that anyone can use without trainingโjust point and click
โจ Intelligent fallback system that handles edge cases and uncertain predictions gracefully
โจ Automatic dataset collection that improves the model continuously as users interact with it
โจ Full production deployment with real infrastructure that can handle concurrent users
โจ Sub-second predictions that make the experience feel instant and delightful
What we learned
Technical Skills ๐ป
- Deploying deep learning models in production environments with FastAPI
- Advanced image preprocessing techniques for handling real-world camera input
- Performance optimization strategies for ML inference at scale
- CORS, multipart form data, and modern web API design patterns
Product Design ๐จ
- UX patterns for communicating AI uncertainty to users without breaking trust
- Balancing automation with user control in AI-powered applications
- The importance of fallback mechanisms in production ML systems
Sustainability Impact ๐
- How much confusion exists around proper recycling practices
- The potential for technology to make sustainable behaviors more accessible
- The importance of localized recycling instructions (different regions have different rules)
What's next for EcoSnap
๐ Expanded categories - Support for electronics, hazardous materials, specialty items
๐ Location-based instructions - Tailor disposal guidance to local recycling regulations
๐ฎ Gamification - Reward streaks, achievements, and impact tracking to build habits
๐ฑ Native mobile apps - iOS and Android apps for better camera integration and offline support
๐ฅ Community features - Share tips, rate local recycling centers, connect with eco-conscious users
๐ Impact dashboard - Visualize your environmental impact over time (COโ saved, landfill diverted)
๐ Model retraining pipeline - Continuously improve accuracy using collected user data
๐ข Business partnerships - Integrate with waste management companies and recycling facilities
Built With
- cnn
- deep-learning
- fastapi
- keras
- machine-learning
- nextjs
- python
- react
- tailwindcss
- tensorflow
- typescript
Log in or sign up for Devpost to join the conversation.