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

Share this project:

Updates