This project implements real-time object detection and vehicle tracking using the YOLOv8 model. The system detects cars in video footage, tracks their movement, calculates their speed, and displays relevant information.
- Detects and tracks vehicles using the YOLOv8 model.
- Calculates vehicle speed based on movement across defined lines.
- Saves the video output with overlays for bounding boxes and speed information.
- Logs car data (speed, object ID, timestamps) to a text file for analysis.
- Python 3.x
- OpenCV
- Ultralytics YOLO (Install using
pip install ultralytics
) - Pandas
- Numpy
-
Clone this repository:
git clone https://github.com/ZIEDSAGGUEM/counting_cars.git cd counting_cars
-
Run the script:
python speed.py