Inspiration

We aimed to build smart cities by helping garbage truck drivers receive the most efficient route in near-real-time, minimizing waste buildup in prone areas. This approach directly addresses issues of inefficiency in traditional waste collection, which often relies on static daily or weekly routes.

You might be wondering, why not just let drivers follow standard routes? In densely populated areas, waste accumulates faster than in less populated zones. This means that a one-size-fits-all route approach leads to inefficient pickups, resulting in garbage buildup that contributes to air and water pollution. By targeting areas where waste accumulates more quickly, we can reduce contamination, improve air quality, and create greener, healthier environments. Additionally, optimizing waste collection can lead to more sustainable use of resources and reduce the strain on landfills.

What it does

CleanSweep has sensors that collect real-time information about all the trash cans in the city, detecting different waste levels. This data is live-updated in the truck drivers' main portal while they drive, allowing them to receive the most efficient collection routes. These routes are optimized based on real-time data, including the percentage of trash bin capacity filled, traffic conditions between bins, and the number of days since the last pickup. As drivers collect trash, they can update their progress live to receive the next optimized route for the remaining bins.

How we built it

For our hardware: We used two phone cameras in two similar scenarios that sent photos repeatedly to a computer. This image is then passed onto the Raspberry Pi where Python OpenCV was used to detect the trash level filled. Then a Node.JS script was used to display the levels (1 to 5) on a set of LEDs and then pass the information to a local server for further processing on the software side.

Backend: We received the reported trash level data from the hardware, information about the traffic in the surrounding vicinity as well as distance to the bin from the Google Maps API and Google Distance Matrix API, and pre-modeled values for time since last garbage retrieval and fed this into a Random Forest Classifier model on Databricks. Our model makes predictions on how to prioritize the bin routes in order to get a short path and distance–resulting in fewer emissions. An adjacency matrix was then used to retrieve the highest priority paths based on traffic and waste levels.

Frontend: We used React for the UI and TailwindCSS for styling to create the portal, deployed over Terraform. We brought all of this information together to display the recommended optimal routes based on how full the bins were (which can be changed by adding more trash to bin 1 and 2 in real life).

Challenges we ran into

Measuring the level of the trash bin was actually a very challenging task for what seemed like a simple task. We first tried looking for pre-trained models that could do it for us, but other models only worked with object tracking. We went to OpenCV, but that only worked in certain conditions. Thus, one of the hardest challenges we experienced was making sure the lighting conditions, the setup for the cameras and hardware, and our OpenCV contour algorithm worked deterministically, as even a shadow could mess with our results.

Accomplishments that we're proud of

None of us had ever worked with OpenCV or with using hardware at a hackathon. We wanted to take some of the skills we learned in our electrical classes and implement them with a cool solution, even if it was a bit tacky. We were super proud of learning how OpenCV worked and how we could use hardware as well as a network to create a complete interactive solution. Another major component of this hackathon was hardware as we’ve always wanted to use such a concept to visualize our project and make it easier to understand for everyone on what our goals are. We enjoyed our varied skills by stepping out of our comfort zone and using new technologies; each member used a new skill to implement in the project.

What we learned

All of us learned about the parts of networks and hardware required to communicate including the security standards and communication frequency needed to keep all the data real time. We learned how to build a working website with a login system through the use of react and vite, as well as implementing the Google maps API for visualizing the route for the drivers. We also learned how GPIO works on a raspberry pi and how a simple JS script can control the power output for these pins to control LEDs. Another skill we found interesting was the use of OpenCV for image processing as it made computing the percentage a task of a second rather than a longer time of manual image processing algorithms. Finally, we were able to start using an ML model to train and help us find the best routes for drivers, this resulted in faster travel times as traffic was avoided and garbage collection optimized.

What's next for Clean Sweep

Clean Sweep’s next goals would be to implement real time sensors in bins spread out all over the city to collect data and help train the model by providing the large amounts of data. This would then help implement this real time UI to efficiently visit all the necessary stops for the day. Such a system would also allow for coverage over rare cases such as a garbage truck missing a stop or allowing other trucks to take over a broken truck’s schedule as the route would update in real time to collect all garbage fast and efficiently.

Built With

Share this project:

Updates

posted an update —

Hey There I'm Bryan Ramirez-Gonzalez, a First-Generation Latino Freshmen attending USC. Thanks for checking out our project, and feel free to reach out for any questions!

If you would like to learn more about what I'm up to, please check out the "My Activity" section on my Website: bryanram.com .

Otherwise, feel free to connect with me on Linkedin: https://www.linkedin.com/in/bryanrg22

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

Submission history