jitacm / -30DaysDevChallenge-

Welcome to the 30DayDevChallenge repository! This repository is dedicated to a month-long coding challenge designed to help developers of all levels enhance their skills through daily coding tasks and projects.
19 stars 28 forks source link

Car_Counter/30_Days_of_Python #312

Open pratikshabhujade opened 3 months ago

pratikshabhujade commented 3 months ago

Car Counter This project demonstrates a car counting application using Python, OpenCV, YOLO, and the SORT tracker. It performs object detection, object tracking, and counts vehicles passing through a specific area in a video or live camera feed. This can be useful for traffic management and monitoring applications.

Features •Object Detection: Utilizes YOLOv8 for detecting vehicles in the video. •Object Tracking: Employs the SORT (Simple Online and Realtime Tracking) algorithm to track vehicles across frames. •Counting Vehicles: Counts the number of vehicles passing through a defined line on the screen. •Masking: Uses a region mask to focus on a specific area in the frame. •Visualization: Displays bounding boxes, IDs, and a count of vehicles in real-time.

Requirements •Python 3.x •OpenCV •cvzone •numpy •ultralytics (for YOLO) •sort (for tracking)

Usage The script reads from a video file (Media/cars.mp4) or you can modify it to use a live camera feed. The count_line variable defines the line on the screen where vehicles are counted. Vehicles are counted when they cross this line, and the count is displayed on the screen.

Screenshot 2024-08-13 192721

github-actions[bot] commented 3 months ago

Thank you for creating this issue! 🎉

We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our [CONTRIBUTING.md] for guidelines on contributing to this Domain.