Skip to content

trewto/YOLO-Video-Analytics-Extractor

Repository files navigation

YOLO Video Analytics Extractor 🎯

A powerful GUI-based tool for video object detection, tracking, and structured data extraction using YOLO (Ultralytics).

Designed for traffic analysis, pedestrian behavior research, and dataset generation, this tool converts raw videos into clean, analysis-ready CSV data.


🔥 Key Features

  • 🎯 YOLO-based object detection (Ultralytics)
  • 🧠 Multi-object tracking (ByteTrack)
  • 📊 Automatic CSV data extraction
  • 🎥 Live detection preview
  • 🧾 Annotated video export
  • 📁 Multi-video queue system
  • ⚡ GPU acceleration (CUDA support)
  • 🎛️ Full GUI (Tkinter-based)
  • 🔍 Class filtering (by name or ID)
  • 🚀 Batch processing for high performance

📸 Demo Workflow

Input Video → Detection → Tracking → Data Extraction → CSV Output

📂 CSV Output Format

Each detected object is exported with:

Field Description
video_name Source video
frame Frame index
time_sec Timestamp
track_id Unique ID (if tracking enabled)
class Object class
confidence Detection confidence
x1_rel Normalized bounding box
y1_rel Normalized bounding box
x2_rel Normalized bounding box
y2_rel Normalized bounding box

🛠️ Installation

1. Clone the repository

git clone https://github.com/trewto/YOLO-Video-Analytics-Extractor.git
cd YOLO-Video-Analytics-Extractor

2. Install dependencies

pip install -r requirements.txt

Dependencies used in this project include:


▶️ Usage

Run the GUI:

python yolodetectionextractor_v13.py

alt text

alt text

⚙️ Configuration Options

Option Description
Tracking Enables ByteTrack tracking
Live View Real-time visualization
Export CSV Save detections
Full GPU Maximum speed (disables live & tracking)
Frame Skip Process every Nth frame
Batch Size Controls GPU load
Resize Optimize processing speed
Class Filter Select specific objects

🧠 System Overview

  • YOLO model loads once for efficiency
  • Frames processed in batches
  • Optional tracking using ByteTrack
  • Results converted to normalized coordinates
  • CSV written incrementally (chunked) for large videos


⚠️ Important Notes

  • Tracking forces batch size = 1
  • GPU strongly recommended for performance
  • Large videos use chunked CSV writing to prevent memory issues

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages