Git Product home page Git Product logo

real-time-object-detection-tracking's Introduction

Real-Time Object Detection and Tracking

This project implements real-time object detection and tracking using the YOLOv5 model integrated with the SORT (Simple Online and Realtime Tracking) algorithm. The software uses PyTorch, OpenCV, and ultralytics YOLO implementations for robust and efficient object tracking in video streams from webcams.

Features

  • Real-Time Detection: Leverages YOLOv5 for high-accuracy object detection.
  • Object Tracking: Integrates SORT algorithm for stable and reliable object tracking.
  • CUDA Support: Optimized for CUDA-enabled devices for accelerated computing performance.
  • Flexible Input Options: Configurable for different webcam sources and settings.

Prerequisites

  • Python 3.8 or newer
  • PyTorch 1.7 or newer
  • OpenCV 4.x
  • NumPy
  • ultralytics YOLOv5 (automatically downloaded via PyTorch Hub)

Installation

  1. Clone the Repository:

    git clone https://github.com/fei123ilike/realtime-object-detection-and-tracking.git
    cd realtime-object-detection-and-tracking
  2. Set Up Python Environment::

        python3 -m venv venv
        source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Set Up Python Environment::

        pip3 install -r requirement.txt

Usage

To start the object detection and tracking, simply run the script with the appropriate arguments:

    python3 detection.py --source 0 --model_weight yolov5s --iou_threshold 0.5
    python3 tracking.py --source 0 --max_age 30 --iou_threshold 0.5

arguments:

--source: 0 (webcam) or xxx.mmp4 local video

--max_age: Maximum number of frames to keep alive a track without associated detections

--iou_threshold: bounding boxes overlapping ratio in two consecutive frames

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Thanks to the ultralytics team for providing an accessible YOLOv5 model implementation.

The SORT algorithm is developed by Alex Bewley[https://arxiv.org/abs/1602.00763].

real-time-object-detection-tracking's People

Contributors

felixow avatar

Watchers

Felix Lu avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.