Vehicle Detection

πŸš— Real-Time Vehicle Detection & Counting System

A practical computer vision project that detects, tracks, and counts vehicles in video footage. It uses YOLOv8 for object detection and SORT for tracking, giving each vehicle a unique ID as it moves through the scene.

Designed for traffic monitoring and transport-focused experiments, the system can process recorded footage or a live camera feed, including iPhone input. Vehicles are counted when they cross a user-defined line, with live visual feedback shown directly on screen.

✨ Key Features

  • Detects cars, buses, trucks, and motorcycles
  • Tracks vehicles across frames with unique IDs
  • Counts vehicles crossing a defined line
  • Supports real-time video processing
  • Displays live count and FPS statistics
  • Allows flexible line placement for different scenes

πŸ” How It Works

Each frame is analysed by YOLOv8 to detect vehicles, and SORT then links detections between frames so the same vehicle can be followed over time. When the tracked centre point crosses the counting line, the system increases the total count and updates the display in real time.

🎯 Practical Uses

This project is useful for small traffic studies, parking analysis, transport demonstrations, and testing computer vision workflows. It is intentionally lightweight, making it a good example of how detection and tracking can be combined in a simple but effective way.