Smart Waste Sorting Assistant
Inspiration
We set out to reduce recycling contamination by giving people instant, reliable guidance on which bin to use. A small mistake in sorting can make an entire load of recyclables unusable, so we wanted to make the right choice obvious and fast.
What It Does
The assistant allows you to upload a photo or capture a live camera frame, sends it to a /classify FastAPI endpoint, and returns:
- The predicted waste stream (Recycle, Compost, or Trash)
- A friendly emoji and color cue
- A confidence score
- A short reasoning explanation
This way, users not only see the answer but also understand why that bin is correct.
How We Built It
- Frontend: A lightweight HTML interface that toggles between upload and live camera modes.
- Backend: A FastAPI server hosting a PyTorch model trained on the TrashNet and TACO (Trash Annotations in Context) datasets.
- Model mapping: Raw outputs from the model are converted into clear, user-friendly categories.
Challenges We Ran Into
- Frontend–Backend Communication:
- CORS errors when the browser tried to hit the FastAPI endpoint from a different port.
- Large payload sizes when sending live camera frames slowed down responses until we added compression.
- CORS errors when the browser tried to hit the FastAPI endpoint from a different port.
- Model Accuracy:
- The model initially confused plastic wrappers with paper, incorrectly marking them as recyclable.
- We retrained with TACO data to better capture soft plastics and reduce this error.
- The model initially confused plastic wrappers with paper, incorrectly marking them as recyclable.
Accomplishments We’re Proud Of
- Built our first end-to-end web app, integrating a custom ML model into a real-time system.
- Successfully connected the frontend and backend to work seamlessly with live camera input.
- Delivered a demo-ready prototype that feels both useful and approachable.
What We Learned
- How to structure a full-stack ML project, from dataset curation to model training to deployment.
- The importance of dataset diversity: real-world waste looks much messier than clean benchmark images.
- Handling practical engineering issues like CORS policies, payload optimization, and model inference speed.
What’s Next for Smart Waste Sorting Assistant
- Expand the training dataset with more examples of plastic wrappers, food packaging, and contaminated recyclables.
- Deploy a mobile version to make it more accessible in everyday life.
- Explore adding location-aware rules so guidance matches each city’s recycling standards.

Log in or sign up for Devpost to join the conversation.