Introduction: LitterTrack is an AI based solution that tackles the societal issues of littering, trash accumulation, and failure to recycle. Using the rapidly developing fields of Machine Learning and Computer Vision, and the new cultural staple that is Twitter, LitterTrack takes advantage of security camera footage to detect, track, and log when littering occurs. When a litterbug is caught, the image of the littering offender is posted to a Twitter page. The piece of trash is continuously tracked as long as it remains in the scene, and if it's removed by a "good Samaritan" pedestrian, the tracking stops. This software could be integrated to varying degrees with already installed security cameras positioned in major cities. This program could also be used to flag sections of video, allowing officers and city workers to quickly and efficiently find where litter has been thrown, and appropriately fine the offenders. Additionally, more cameras could be installed to curb littering in areas that are especially hard hit. Littering destroys the beauty of an area, the mindset of the populace, and contributes to both environmental and urban decay. Through the use of cutting edge technology, LitterTrack can transform these modern realities into distant memories.

Three example result videos are provided: example1.mp4, example2.mp4, and example3.mp4. Their original, unannotated videos are also provided, with the names 1.mp4, 2.mp4, and 3.mp4 respectively. Tweets are sent to the page "" whenever a litterer is detected. 

This project falls under the "Environmental Awareness and Sustainability" theme, and was completed by Tim Chinenov, Varun Rao, Theodor Ross, and Steve Sperazza.

Relevance: Garbage is a clear environmental concern, due to it’s impact on natural habitats and human communities. Current solutions involve sending people to search for trash; this process can be both slow and tedious. Individuals do not necessarily know where trash is, and there is no current, realistic method of effectively curbing littering. While some areas have signs that warn of fines, such punishments are not realistically enforceable. An active approach that utilizes the existing camera systems in dense urban environments can be used to remedy the littering problem. The use of Twitter also helps increase awareness of this environmental issue.

Future Plans: In the long term, we would want to integrate this application with robotic technology. After someone is caught littering, a robot can be dispatched to find the trash and clean it up. At the moment, the Twitter message acts as a placed holder for the robot command.

Litter type detection is also a feature of interest. During the hackathon, we aimed to capture the image of the litter and determine what type of garbage it was (i.e. plastic, paper, or metal). A dataset was found that included images of garbage. Unfortunately, we ran into a roadblock when it came to training a neural network to classify trash. A 80% success rate classifier was developed to differentiate between cardboard and glass. Ideally, the classifier needs to handle more types of trash. 

In terms of algorithmic improvement, the overall code can be designed to be more robust, handle more littering, and more people. While few modifications need to be made, the current code expects only one user to litter at a time. The code would experience difficulty in a very crowded environment, as well. Further improvements can be made to accommodate more than a few people.

Built With

  • opencv
  • python
  • ubuntu
  • using-python-2.7.12-extract-all-contents-of-the-compressed-file-"littertrack(main).zip"-to-the-same-directory.-to-run-the-program
  • you-must-install-the-following-libraries:-opencv-(4.0.0-was-used
Share this project: