Inspiration

We were inspired by the everyday confusion people face when disposing of waste — “Does this go in recycling or trash?” The consequences of improper segregation are real: contamination in recycling bins, landfill overflow, and wasted resources. We wanted to use AI to provide real-time help with waste identification in a way that’s fast, intuitive, and accessible.

Its ideal use case would be for a user to place the waste in a box and the camera captures images and detects the waste. Then the machine automatically pushes the waste into the correct bin.

What it does

EcoLens AI uses a webcam to identify and classify waste items in real-time. When an object is placed in the center box on-screen, the model predicts its category (e.g., plastic, glass, metal, cardboard, paper, or trash) and suggests the correct bin. It uses a combination of CNN and MobileNetV2 to get high accuracy while keeping inference fast and lightweight.

How we built it

We started by cleaning and splitting a publicly available garbage classification dataset from Kaggle. We trained two models — a custom CNN and a pretrained MobileNetV2 — using Keras and TensorFlow. We then built an ensemble system that averages both predictions. For the UI, we used OpenCV to create a center-screen detection zone, and classify objects only when they enter that space.

Challenges we ran into

  • Initially, the classifier gave poor results until we rebalanced the dataset and added proper data augmentation.
  • We struggled with OpenCV’s motion detection approach, which gave false triggers. We pivoted to always-classify within a center-box.
  • Running two models simultaneously caused some lag until we optimized the input pipeline.

Accomplishments that we're proud of

  • Built a working real-time system with 70%+ validation accuracy using two models.
  • Designed a simple and intuitive "center-box detection" UX that avoids false positives.
  • Deployed and tested successfully on consumer hardware using webcam feed.

What we learned

  • Combining models (ensembling) gives a noticeable boost to classification accuracy.
  • Real-time video inference has its own quirks — you have to balance speed with model size.
  • Clean data structure and consistent folder naming saves a lot of debugging time later on.

What's next for EcoLens AI: Real-Time Trash Detection for Smarter Cities

  • Upgrade to YOLOv7 to allow for full-scene multi-object detection
  • Add voice or haptic feedback for accessibility
  • Deploy on Raspberry Pi or microcontrollers for smart bin prototypes
  • Add a “learning mode” to collect edge cases and improve over time

Built With

Share this project:

Updates