Inspiration

Our project was inspired by our personal experiences with the Canadian recycling system. When approaching this hackathon, we had two main goals: to incorporate artificial intelligence and to develop a user-friendly web platform. During the event, as our team got to know one another, we discussed our hometowns and unique experiences. Surprisingly, this conversation turned into a discussion about how recycling systems vary widely between cities in Canada. For example, one of our developers, Daniel, shared that the recycling experience in Saskatchewan is quite different from his new home in Waterloo. This sparked the idea to create a recycling aid web app, leveraging the Streamlit platform to make recycling guidance accessible and tailored for users across different locations.

What it does

The TrashMap idea is to make recycling simple again. The project uses a variety of AI software to power its backend and an easily adaptable UI through Streamlit on the frontend.
The TrashMap works by taking an image of trash from the user, either through their camera or via file upload. This image is then processed and sent to the Google Cloud Vision image interpreter, which analyzes the image and converts it to text.
Once in text format, it is shown to the user and processed in the background using the Perplexity LLM, which provides instructions on how the item can be recycled, if it can be recycled at all. Alongside this, the AI categorizes the recyclable item into its appropriate disposal category.
After providing general recycling instructions, the TrashMap program goes further by using Google's Places and Geocoding APIs. These APIs use the user’s location to display nearby recycling disposal facilities within a 10 km radius.
Users can continue running the program, testing new images as much as they'd like, without the website needing to reset.

How we built it

The TrashMap is developed on the Streamlit framework, which allows for quick and seamless integration with Python for web application development. We used Google's Geocoding, Places, and Cloud Vision APIs to handle location and image processing, as well as Perplexity AI and OpenAI for text processing and leveraging their extensive database.

Challenges we ran into

A large part of our success hinged on our ability to compartmentalize tasks and designate areas of the project to one another.
On the backend, a significant challenge we faced was data interpretation. While the image recognition was accomplished early on, interpreting the image data and the location data proved to be difficult and time-consuming.
Another major issue we encountered was a Streamlit bug where every time the user entered their postal code, the page's AI would reset. To address this, we had to rewrite the UI and postal code handling logic to accommodate this strange behavior.
On the frontend, the learning curve was steep initially, as this was our first time using the Streamlit interface. However, it turned out to be user-friendly and efficient to work with. We greatly appreciated Streamlit's built-in mapping features, which saved us both time and resources. Often, UI overhauls were needed to accommodate new backend ideas, which, while challenging, ultimately led to a final product that exceeded our initial expectations.

Accomplishments that we're proud of

This was our group's first hackathon, and we are proud of what we accomplished. Here are individual highlights from each team member:

  • I am grateful for our ability to work as a team and seamlessly divide tasks.
  • I'm proud of how we were able to collaborate effectively to overcome the challenges we faced.
  • I'm proud of the amount of coding we learned in the last 24 hours, particularly in image interpretation using Google's Cloud Vision API.

What we learned

In the last 24 hours, we’ve gained a strong understanding of Streamlit’s UI design and started our journey into AI development through this project. We also developed connections to existing API frameworks that can be used in future projects, as well as valuable prototyping and teamwork skills. The ability to designate tasks and collaborate on a GitHub repository seamlessly is a skill none of us had before today.

What's next for TrashMap

We aim to improve several aspects of TrashMap, including:

  • More accurate implementation of the mapping system to find local waste disposal facilities. Although we have a working prototype, we couldn’t configure the Google Places API to be 100% accurate in the time allotted.
  • Adding a feature to allow users to share the app with friends to increase its visibility and impact.
  • Further integration with our Recycling Category Database, which is currently limited to Toronto recycling data. Expanding this database will make TrashMap more useful across other regions.
  • Clean up our code, due to time crunch there is a lot of clutter
  • Cleaning UI

Built With

Share this project:

Updates