Volunteer Spotlight: Reduce, Reuse, Record

The Code for Sacramento and Open Fresno Brigades are recording litter and helping address its environmental impacts
a collage of trashai images

Waste is one of the biggest environmental challenges facing us today—and how we thoughtfully manage the growing amount of it is a shared challenge for communities across the country. Litter can wreak havoc on local ecosystems, and some states, including California, are trying to address the problem by passing regulations that require municipalities to maintain an acceptable level of cleanliness—but measuring trash in the environment can be difficult. Classical measurement techniques require surveyors with pen and paper to manually quantify every piece of trash at a site. This method is time-consuming and inefficient.

Data could make that easier. Recently, Code for America Brigades in Sacramento and Fresno, CA have been working in partnership with nonprofit and government partners to create new systems of trash classification and management. The result, TrashAI.org is an open-source web application leveraging artificial intelligence (AI) to help scientific researchers, municipalities and citizen scientists address litter and its environmental impacts.

To learn more about the project, we spoke with Walter Yu, Mary C Norris, and Dan Fey, Co-Captains of Open Fresno/Code for Sacramento.

Tell us a little about how you got involved with the Brigade Network, and how this project came together. 

Walter: I got involved with Brigade Network in the fall of 2018 through the Sacramento Brigade and grew my role from volunteer to core team member, then Co-Captain. Trash AI was proposed by Win Cowger, a research scientist with the Moore Institute for Plastic Pollution Research, when I was reaching out to my professional network for project ideas. Along with Win, I’m a part of the California Trash Monitoring Workgroup, which is organized by the California Water Board to establish methods, policies, and tools to address litter statewide and has a subcommittee dedicated to leveraging data and technology to address litter.

Dan: I joined Code for Sacramento after moving here in January 2019. I wanted to meet like-minded friends and use my engineering skills to help the community. I was instantly hooked and continued helping the group, becoming co-captain in the fall of 2020. I’ve been helping with the technical design and project management of TrashAI.

Mary: I’ve been a Co-Captain of Open Fresno since 2020. I met Dan as a part of our Network ReVisioning Peer-to-Peer interviews last year. Towards the end of 2021, I started attending Code for Sacramento meet-ups and noticed they could use help. I then started advocating for others to get involved; for example, I met and recruited one of our volunteers, Steven Hollingsoworth, at a linux meetup, and he has since put in hundreds of hours into the code base and pretty much single handedly wrote the entire front-end and back-end application. After going to a trash monitoring meeting with Walter and Win, I realized this project could make a big impact for scientific researchers and our environment. 

Why is it so important that we pay attention to litter? How has it traditionally been monitored and handled?

Walter: Litter is a huge problem in urban and rural areas worldwide. The buildup of trash has so many detrimental effects—just think about what happens when it rains and pollutants that bind to trash are transported to waterways that support entire cities. Once trash enters waterways, it can harm wildlife that ingest it, smother vegetation, and reshape landscapes. Every community is affected by this communal challenge.

Mary: Here in the Central Valley of California, the effects that litter has on the natural environment are even more pronounced. As one of the largest agricultural suppliers of almonds, grapes, and other produce, our water is a precious resource. How can we ensure that litter is being monitored appropriately? It’s a difficult problem when litter can be as small as a few rumpled napkins or as big as some discarded household appliances. With traditional measurement methods, surveyors map out litter for removal with a pen and paper, an inefficient and often incomplete way to track trash. With growing populations, trash increases and the need  to address trash efficiently is also increased.

a picture of trash with labels on it
a bottle with a label on it
Images from the TrashAI database.

What’s unique about the TrashAI approach?

Walter: An increasing number of scientific researchers, surveyors, volunteers, and community scientists are incorporating digital images to track the prevalence and distribution of trash observed during field surveys and litter cleanup events. More and more of them are also using AI to analyze these images—but what’s unique about Trash AI is its open-source framework.

Trash AI lowers the barrier to entry for researchers, municipalities, and citizen scientists to quantify trash in the environment. It leverages computer vision and an easy-to-use website which allows users to batch upload digital images of litter, analyze the types and quantities of trash in all of their images, and download their results. 

Dan: This is something that I’ve learned from Win Cowger, a colleague of Walter’s at the California Water Board Trash Monitoring Workgroup. He’s helped us see that, although there are many artificial intelligence (AI) algorithms developed for trash classification, none are readily accessible to the average litter researcher. Running AI algorithms can be difficult to deploy without data science experience and often run on expensive cloud servers/services. Our system alleviates these obsticles by using a browser-side AI framework (TensorFlow.js) and a modern web user interface to allow anyone who wants help their community run our AI algorithm with a simple photo upload.  Additionally, since our project is open source on Github, our system may be freely copied and adapted for other AI use cases.

Were there any impactful partnerships in this project? How did you build and network the connections needed to make Trash AI effective?

Walter: We were able to present this project at monthly meetings of the California Water Board Trash Monitoring Workgroup. The workgroup consists of stakeholders from regulatory agencies, state and local agencies, researchers, and citizen scientists. We’ve been able to partner by asking for feedback between project software development sprints. For example, we implemented features to map litter locations from metadata included with uploaded photos, allow users to manually correct misclassified photos (e.g. litter not being detected or mislabeled) and increase the number of available labels for classifying litter in photos. 

Mary: An impactful partnership has also been the collaboration between Code for Sacramento and Open Fresno. Members of our groups are aware of and similarly impacted by litter and water issues where we live. It’s been helpful to merge our talents because our technical skillsets complement each other. 

Members of our groups are aware of and similarly impacted by litter and water issues where we live. It’s been helpful to merge our talents because our technical skillsets complement each other. 

How could Trash AI change the environment in your community? Where do you hope this project goes from here?

Walter: This project is raising awareness of trash in the environment—and our hope is that raising awareness will ultimately help change the public’s behaviors and attitudes towards littering. We also want to recognize that addressing litter and environmental degradation is a social justice issue. Reducing litter will reduce the pollution burden on Black, Indigenous, and People of Color (BIPOC) communities and communities with low income, which often experience higher levels of pollutants in their neighborhoods. The California Environmental Protection Agency (CalEPA) has partnered with the Office of Environmental Health Hazard Assessment (OEHHA) to create the CalEnviroScreen tool to track these effects.

In addition, this project helps develop additional trash data. There are many studies involving computer vision, AI, and trash identification in images, so such data will be a valuable resource. Just one example is the Trash Annotations in Context (TACO) dataset, which was used to develop the Trash AI model and has over 40 academic citations in the past year alone. We hope to make our model more useful to the scientific community soon by expanding annotations to include trash taxonomy classes and building a user interface that allows people to edit and improve the annotations currently predicted by the model. We’re also working in collaboration with the TACO development team to improve workflow integration to get the data that users share to the Amazon Web Services (AWS) S3 bucket into the TACO training dataset and trained model. 

What would you like other volunteers to learn from your experience working on this project? 

Mary: I would like other volunteers and Brigade leaders to learn that collaboration between Brigades is possible—and more than that, it’s hugely beneficial. You don’t have to go so far as we have, co-captaining each other’s Brigades, but working across groups opens up the possibility of experimenting with bigger and more impactful ideas. Collaborating with another Brigade could make that project—that one you’re thinking of throwing in the towel on—a reality.

Walter: What’s been so fascinating about this project is that it requires such a diverse set of skills including user experience, machine learning (computer vision), trash-related research, web application deployment (devops), and project management. We didn’t have all these skills on hand at the beginning of the project. We had to build a communal skillset through cross-Brigade collaboration, recruitment, and outreach to experts in the field. We learned a lot in the process of creating the team for this project, and grew individually and together through such a collaborative working process that found a place for each person’s unique contributions.

Related stories