Skip to content

๐Ÿš™ This project merges YOLOv8l for precise car detection with SORT for streamlined car tracking, offering a comprehensive tool for real-time vehicle counting in designated areas.

License

Notifications You must be signed in to change notification settings

rajveersinghcse/Car-Detection-and-Car-Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Car Detection and Car Counter

This project utilizes the YOLOv8l model for car detection and implements a Simple Online and real-time tracking (SORT) algorithm for counting the number of cars in a video stream. The system detects cars within a predefined region of interest and tracks them using unique IDs.

car_gif

Requirements

  • Python 3.x
  • OpenCV
  • NumPy
  • Ultralytics YOLO
  • SORT (Simple Online and Realtime Tracking)

Installation

  1. Clone the repository:
git clone https://github.com/rajveersinghcse/Car-Detection-and-Car-Counter.git
  1. Install the required packages:
pip install -r requirements.txt

Usage

  1. Ensure you have a video file named cars.mp4 in the project directory.
  2. Download the YOLOv8l model weights (yolov8l.pt) from the Ultralytics YOLO repository and place them in the project directory.
  3. Run the following command to start the car detection and counting process:
python car_counter.py

Description

  • car_counter.py: This script performs car detection and counting using YOLOv8l for object detection and SORT for object tracking. It reads frames from the cars.mp4 video, applies a mask to isolate the region of interest, detects cars within this region, tracks them using SORT, and counts the total number of unique cars.

Acknowledgments

License

This project is licensed under the MIT License.

About

๐Ÿš™ This project merges YOLOv8l for precise car detection with SORT for streamlined car tracking, offering a comprehensive tool for real-time vehicle counting in designated areas.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages