Littering is a serious environmental problem that degrades the beauty and long-term viability of our surroundings. This mini project suggests using the object detection algorithm YOLOv5 to prevent littering. The objective is to create an anti-litter system capable of identifying the action of dumping and track down the person responsible in real time. The project focuses on implementing YOLOv5 along with background subtraction technique which tracks only the moving objects. When it is determined that the moving object is a human, a bounding box is formed, and any object that moves outside the box is found by measuring the distance between it and the human. It is acceptable to conclude that the item that separates from the person is trash. Once more examined by YOLOv5, if this object is found to be trash (such as bottles, covers, cans, etc.), the act of dumping is recognized. By the above-mentioned technique, the project seeks to support ongoing efforts to create cleaner and more sustainable landscapes. It is now feasible to effectively detect and solve littering events, thereby fostering a cleaner and healthier ecology for everyone.