This project implements a real-time car counting system using computer vision techniques. The system utilizes the YOLO (You Only Look Once) object detection model for accurate car detection and the SORT (Simple Online and Realtime Tracking) algorithm for tracking the detected cars.
- Real-time car counting
- Object detection using YOLO
- Object tracking using SORT
Make sure you have the following dependencies installed:
- Clone the repository:
git clone https://github.com/your-username/your-repository.git
- Install dependencies:
pip install -r requirements.txt
- Run the script:
python car_counting.py
car_counting.py
: Main script for the car counting system.videos/cars.mp4
: Input video file for testing the system.yolo-weights/yolov8n.pt
: YOLO pre-trained weights file.mask.png
: Mask image for region of interest.
- Adjust the paths and parameters in the script as needed.
- Make sure to have the necessary video file and YOLO weights before running the script.