Machine Learning Does Its Civic Duty By Spotting Roadside Litter

If there’s one thing that never seems to suffer from supply chain problems, it’s litter. It’s everywhere, easy to spot and — you’d think — pick up. Sadly, most of us seem to treat litter as somebody else’s problem, but with something like this machine vision litter mapper, you can at least be part of the solution.

For the civic-minded [Nathaniel Felleke], the litter problem in his native San Diego was getting to be too much. He reasoned that a map of where the trash is located could help municipal crews with cleanup, so he set about building a system to search for trash automatically. Using Edge Impulse and a collection of roadside images captured from a variety of sources, he built a model for recognizing trash. To find the garbage, a webcam with a car window mount captures images while driving, and a Raspberry Pi 4 runs the model and looks for garbage. When roadside litter is found, the Pi uses a Blues Wireless Notecard to send the GPS location of the rubbish to a cloud database via its cellular modem.

Cruising around the streets of San Diego, [Nathaniel]’s system builds up a database of garbage hotspots. From there, it’s pretty straightforward to pull the data and overlay it on Google Maps to create a heatmap of where the garbage lies. The video below shows his system in action.

Yes, driving around a personal vehicle specifically to spot litter is just adding more waste to the mix, but you’d imagine putting something like this on municipal vehicles that are already driving around cities anyway. Either way, we picked up some neat tips, especially those wireless IoT cards. We’ve seen them used before, but [Nathaniel]’s project gives us a path forward on some ideas we’ve had kicking around for a while.

19 thoughts on “Machine Learning Does Its Civic Duty By Spotting Roadside Litter

      1. Robot arm, big solar panel on top, crawling along the side of the road at 5km/h picking up trash and dumping it in the back. With a couple of square meters of solar panel that might be an affordable power budget for long-term daylight operation. Like, you could use Taylor Alexander’s gardening robot previously shown on hackaday as the base, and it turns out small toy robot arms aren’t that expensive.

    1. Now keep it from killing bums it had correctly classified as litter.
      Even better, don’t…

      I realize this is San Diego, so better government. SF knows there is shit on the streets, doesn’t care. Finding trash not the issue.

      1. Unfortunately you’re right – for most local governments, identifying the problems is not the problem, it’s having the resources to deal with them.

        Although a basic litter-picking robot or robots, even if they had to be coralled by a human operator, could reduce the cost & improve the effectiveness of litter-picking.

        1. Last I checked, SF openly spends about 40k$/bumyear on the ‘homeless industrial complex’. No doubt there is much more hidden waste.

          Nobody collecting that money has incentive to fix anything, rather the opposite.

          They’d rather spend their money on social workers that sit desks all day than actually cleaning. City workers are dependable voters. Counterbalance to all those damn ‘honest job worker tech bros’.

          Trash picking robots will never be paid for by SF (until they are sentient and will reliably vote as expected).

  1. Everything about this project is quite wasteful.

    First of all, you don’t need to process the data in realtime, you just need to record video and it’s corresponding GPS data.

    Second, using an old smartphone (no SIM) and holder for it is a better option. You can process the data slowly on the smartphone or you can bring it inside and connect it to a desktop computer, no cloud services needed.

    It seems like someone is trying to push raspi add-ons boards, rather than share a project that could help.

      1. SF crowd sourced shit tracker has been online for about a decade now.
        City ignores it, no power in cleaning up shit.

        The problem is political. Until ‘they’ are hanging from street lights, nothing will be done. SF gets the government it deserves (good and hard).

  2. I’m trying to decide whether the data is a better proxy for levels of human activity or for recent history of wind strength and duration (or lack thereof, dumping a cluster when it goes slack)

Leave a Reply to The Commenter Formerly Known As RenCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.