DEV Community

Cover image for # Real-Time Object Detection & Tracking with YOLOv8 & Deep SORT πŸš€
Urooj Fatima
Urooj Fatima

Posted on

# Real-Time Object Detection & Tracking with YOLOv8 & Deep SORT πŸš€

Ever wondered if your computer could β€œsee” and track objects in real-time? πŸ‘€

During my CodeAlpha internship, I built a system in Python that does exactly that. It detects objects in video files and live webcam streams, assigning each object a unique ID as it moves.

What I learned / challenges:

  • Objects sometimes got β€œlost” between frames β€” tweaking the tracking algorithm fixed it
  • Switching between video files and webcam input required careful testing
  • Managing Python dependencies and real-time performance was tricky

Tech Stack:

  • YOLOv8 (Ultralytics)
  • Deep SORT
  • OpenCV
  • Python

πŸ’‘ Fun part: Watching the bounding boxes follow objects in real-time felt magical ✨

Check out my code and demo: [GitHub Repo]

CodeAlpha_ObjectDetection

πŸ” Real-Time Object Detection & Tracking
Internship Task 4 β€” CodeAlpha


πŸ“Œ About This Project

This project implements real-time object detection and tracking using:

  • YOLOv8 (via ultralytics) for object detection
  • Deep SORT for tracking objects across frames
  • OpenCV for video input/output (webcam or video files)

It fulfills all internship requirements:

Real-time video input (webcam or video file)
Pre-trained model for object detection
Bounding boxes with tracking IDs
Python implementation with clear, real-time results

πŸš€ Features

  • Detects objects in every video frame
  • Tracks detected objects with unique IDs
  • Works with multiple video files or webcam input
  • Outputs video frames with bounding boxes and labels

πŸ“¦ Installation

  1. Clone the repository

git clone https://github.com/Urooj25/CodeAlpha_ObjectDetection.git cd CodeAlpha_ObjectDetection

2- Create a virtual environment python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate

3-Install dependencies pip install -r requirements.txt

Usage Run on Video Files Place your video(s) in the videos/ folder or detect real time…






Question for you: Have you tried real-time object tracking? How did you approach it?

Top comments (0)