Community
October 4, 2023

Build Backstories: Creating Eco Lens—the Smart Machine that Helps with Recycling

Written by
Sara Gharnit
Senior Content Marketer

We recently attended PennApps XXIV— a vibrant, student-led hackathon where young minds came together to craft solutions aimed at addressing real-world challenges. Our focus was on submissions that exemplified the “Best use of Viam software in robotics.” From smart machines built to ensure school safety to those focused on recycling, these students delivered!

In this post, we want to highlight one of the most impressive builds and let you get to know the students behind it a little better. Dive into our Q&A below to uncover the inspiration and intellect behind Eco Lens: an application merging sustainability with computer vision to identify recyclable items.

Tell us about yourself and your team!

Oscar Chen: Hi, I’m Oscar! I’m a Computer Science freshman from the University of Chicago. My interests lie in machine learning, human-machine interactions, and the expansive field of computer science. When not immersed in tech, you can find me saber fencing, hitting the tennis courts, or diving into poetry.

Charles Liggins: Hello all! I’m Charles, pursuing my first year in Computer Science at Cornell University. PennApps marked my hackathon debut! When I’m not coding, I enjoy sharing meals with friends and a good game of tennis.

Harris Song: Hey, I’m Harris, a senior from Walnut High School, California. PennApps was my inaugural hackathon, where I brought my experience in control systems and hardware integration to the table. Outside of this, my days are filled with hiking the L.A. mountains and exploring new beverage delights at local cafés.

Can you walk us through the initial concept of your build?

Our initial concept came to us when we visited a Starbucks after a somewhat fruitless brainstorming session. When we finished our drinks and went to throw away our cups and straws, we were confused whether to throw them into the recycling or garbage bin. 

Not surprisingly, this is an all-too-common issue with 1 in 5 Americans not recycling because they don’t know what to recycle and what not to recycle. In the face of climate change and a warming planet, companies are investing in sustainability initiatives that target their consumers, but the effectiveness of their efforts could be better measured. 

These issues became a personal dilemma we set out to solve.

So, what does your build do?

Eco Lens is built to help users and trash can owners make more sustainable choices when disposing of items. It employs machine learning and computer vision to identify items through a web stream and determines whether they are recyclable or not. Once the camera identifies an item stored in the trained ML database, the application provides additional information on the item's material in terms of its sustainability. 

Trash can owners can employ Eco Lens to observe and manage the recycled vs. non-recycled trash in each and every trash can over specific time periods as a sustainability metric.

Can you walk us through step-by-step on how you used Viam for your build?

We used Viam’s Python API and an easy installation of Raspberry Pi OS and viam-server to effectively connect a separate compute system to our network. It allowed us to make the system operational within 36 hours while also using a cloud solution that we could have switched to another device if the Raspberry Pi broke, or if there was a hardware issue. 

We attached a camera onto the Raspberry Pi and the Viam online interface automatically recognized the camera, attaching it and including easy-to-use snippets of code to insert into our computer vision pipeline.

What were the most challenging aspects of your build?

Scalability and communication protocols were going to be the most challenging part of the hack, but luckily Viam helped overcome it through their middleware. Our application didn’t need to focus on sending video streams from a computer into another device, which would usually be complicated and may require optimization, since Viam’s service was very robust. 

What was the learning curve like for Viam's platform?

There was almost no learning curve for a platform like Viam since our team had ROS experience and understood some of the intra-machine connections. The peer-to-peer paths in Viam were similar to ROS, although the easy-to-use interface with Viam made changing settings, like streaming resolution or data type, very convenient.

Any plans to upgrade your current hackathon build?

In the future we hope to add more items into our machine learning database for a more versatile application. Incorporating RGBD cameras will help provide for a better model each update cycle due to an increased depth-dimension, where we then are able to use machine learning models to scan an object’s perceived volume and surface area instead of simply detecting the object through a one-dimensional camera lens. 

As a proof of concept, we have already designed a camera holder that would operate above a trash can to test its functionality in the real world. We also plan to make major upgrades to our web stream and dashboard UI to make it more interactive and user friendly.

Any final thoughts or words of wisdom you would like to share with aspiring builders and innovators?

While brainstorming and working through our project, we all shared one common belief: if it’s not hard, you’re doing it wrong. There are no easy solutions to worthwhile problems in this world and building a project is no different. Always challenge yourself with the problems worth solving—problems that you are capable of. 

That being said, work smarter not harder with the technologies and tools you have at your disposal. As a builder and innovator, you must always have the mindset that every problem has a solution, and you will find it, so long as you push through the struggle.

Feeling motivated to construct your own smart machine with Viam? Dive into our documentation to kickstart your journey and immerse yourself in our community to explore other innovative creations that will fuel your inspiration!

Sources:

U.S. Census Bureau, Current Population Survey 2018

on this page

Get started with Viam today!