Code Monkey home page Code Monkey logo

yolov8_tracking's Introduction

Real-time multi-object tracking using Yolov8 with OCSORT

Introduction

This repository contains a highly configurable two-stage-tracker that adjusts to different deployment scenarios. It can jointly perform multiple object tracking and instance segmentation (MOTS). The detections generated by YOLOv8, a family of object detection architectures and models pretrained on the COCO dataset, are passed to the tracker of your choice. Supported ones at the moment are: DeepOCSORT, OCSORT, StrongSORT, ByteTrack and BoTSORT, . They can track any object that your Yolov8 model was trained to detect.

Installation

pip install -r requirements.txt

Tracking

$ python track.py
  • Detection mode

    $ python track.py --yolo-weights yolov8n.pt      # bboxes only
                                    yolov8n-seg.pt  # bboxes + segmentation masks
  • Tracking methods

    $ python track.py --tracking-method ocsort
                                        deepocsort
                                        strongsort
                                        bytetrack
                                        botsort
  • Tracking sources

    Tracking can be run on most video formats

    $ python track.py --source 0                               # webcam
                              img.jpg                         # image
                              vid.mp4                         # video
                              path/                           # directory
                              path/*.jpg                      # glob
                              'https://youtu.be/Zgi9g1ksQHc'  # YouTube
  • Select Yolov8 model

    There is a clear trade-off between model inference speed and overall performance. In order to make it possible to fulfill your inference speed/accuracy needs you can select a Yolov8 family model for automatic download. You can also select image size of 640 or 1280.

    $ python track.py --source 0 --yolo-weights yolov8n.pt --img 640
                                                yolov8s.pt
                                                yolov8m.pt
                                                yolov8l.pt 
                                                yolov8x.pt --img 1280
                                                ...
  • Filter tracked classes

    By default the tracker tracks all MS COCO classes. If you want to track a subset of the classes that you model predicts, add their corresponding index after the classes flag.

    python track.py --source 0 --yolo-weights yolov8s.pt --classes 16 17  # Track cats and dogs, only

    Here is a list of all the possible objects that a Yolov8 model trained on MS COCO can detect. Notice that the indexing for the classes in this repo starts at zero

yolov8_tracking's People

Contributors

410011max avatar beykun18 avatar clarkkent0618 avatar gkeechin avatar henriksod avatar jjaegii avatar mikel-brostrom avatar mohit-robo avatar sajjadpsavoji avatar sph1n3x 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.