Skip to content
Projekte

Über uns

🚗 Effortlessly count cars in videos using YOLOv8-powered computer vision program for streamlined traffic monitoring.

KI und maschinelles Lernen

So werden diese Zahlen gemessen

What you can do

  • Object Detection: Utilizes the YOLO model to detect vehicles in the video.
  • Tracking: Implements the SORT algorithm for real-time tracking of detected vehicles.
  • Counting: Tracks and counts vehicles crossing predefined lines in the video.
  • Visualization: Displays the output with graphical overlays indicating the total count and count in specific directions.

Gemessener Sternzuwachs

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

🚗 Car Counter

Effortlessly count cars in videos using YOLOv8-powered computer vision program for streamlined traffic monitoring.

🌐 Overview

This Python script uses computer vision techniques to count vehicles in a traffic cam video. The implementation is based on the YOLO (You Only Look Once) object detection model, integrated with a SORT (Simple Online and Realtime Tracking) algorithm for tracking.

🚀 Features

  • Object Detection: Utilizes the YOLO model to detect vehicles in the video.

  • Tracking: Implements the SORT algorithm for real-time tracking of detected vehicles.

  • Counting: Tracks and counts vehicles crossing predefined lines in the video.

  • Visualization: Displays the output with graphical overlays indicating the total count and count in specific directions.

🛠️ Prerequisites

Make sure you have the following dependencies installed:

  • Ultralytics YOLO

  • OpenCV (cv2)

  • cvzone

  • SORT (Simple Online and Realtime Tracking)

🏗️ Setup

  1. Clone the repository:

    git clone https://github.com/serialdotai/car-counter.git
    cd car-counter
    
  2. Install the required packages:

    pip install -r requirements.txt
    
  3. Download the YOLO weights file yolov8l.pt and place it in a yolo weights directory.

  4. Run the script:

    python main.py
    

⚙️ Configuration

Adjust the following parameters in the script as needed:

  • lineUp and lineDown: Define the lines for counting vehicles in the video.
  • mask: Set the mask image for region of interest.

📹 Output

The processed video will be saved as result.mp4 in the same directory.

🙌 Acknowledgments

Ähnliche Projekte entdecken

Wird geladen…