Using AI and a Bike to Help Fix Tacoma's Potholes

0:00
/0:04

I was disappointed to see the recent failure of Tacoma's Streets Initiative #2, which would have provided dedicated funding for street repairs and safety improvements. This motivated me to explore alternative ways to help keep our city’s streets in better shape.

As someone who regularly bikes around Tacoma, I’ve experienced firsthand how many of our roads are deteriorating. Some are reaching a point where full replacement – and significant cost to the public – will be necessary. I’ve lost count of how many bike tubes have been ruined by unexpected impacts!

A training image for an artificial intelligence computer vision model, targeting potholes

However, consistent maintenance – like crack sealing and pothole filling – can extend the life of asphalt roads, saving money for both the city and drivers (and cyclists!). This isn’t just about comfort; the rough roads also take a toll on Pierce Transit buses, causing wear and tear, which manifests as excessive rattling inside the bus.

So, I started thinking about how technology could help. I’ve been experimenting with AI, cameras, and the Tacoma First 311 reporting system. I realized these could be combined to create a more streamlined process for identifying and reporting potholes and other neighborhood issues. While it won’t fix severely damaged roads, it could help address smaller hazards and give the city a better understanding of problem areas that go underreported by people who don't know or don't have the time or resources to document an issue in a web interface.

How a computer model sees a street in Tacoma's North End

My setup uses a GoPro Hero 13 Black attached to an e-bike to record 4K video and high resolution GPS coordinates at a speed of roughly 15 miles per hour. Prior to going out with the bike I fine-tuned a computer vision model using images I took with a DSLR camera, to classify objects like cars, potholes, utility covers, and recycling bins. I then used Python for data extraction and AI model inference for each one of the video frames. I finished up by producing a heatmap in R to show where streets were showing the presence of potholes. My initial focus was N 6th Street in the North Slope Historic District, but my route also captured issues on North M Street as well that were less obvious to me. It turns out that the AI model identified that North M Street, while not having many visible cavities, is showing intensive signs of wear that will likely give way to potholes in the near future.

A heatmap of pothole trouble spots in Tacoma's North Slope Historic District. Areas in red have substantially rougher roads than those in blue. This was in the second run after additional fine-tuning of the computer vision model.

Initially, the model’s results were mixed, with potholes being detected in the sky (don't ask me why), so I added another 80 more classified images. This significantly improved accuracy, allowing it to accurately identify potholes and rough road surfaces during a 10-minute bike ride. It also successfully identified two well-maintained segments of long-lasting concrete, which to me shows that the technology seems to be working.

My next step is to refine the model and submit the findings to Tacoma’s 311 system programmatically. If you know of any streets that could use some attention from a “pothole patrol,” let me know on Bluesky, and I’ll see if I can collect some footage along the street while I am on a ride to detect and report new issues to the city.