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: StrongSORThttps://arxiv.org/abs/2202.13514 OSNethttps://arxiv.org/abs/1905.00953, OCSORThttps://arxiv.org/abs/2203.14360 and ByteTrackhttps://arxiv.org/abs/2110.06864. They can track any object that your Yolov8 model was trained to detect.
Everything is designed with simplicity and flexibility in mind. We don’t hyperfocus on results on a single dataset, we prioritize real-world results. If you don’t get good tracking results on your custom dataset with the out-of-the-box tracker configurations, use the evolve.py script for tracker hyperparameter tuning.
git clone --recurse-submodules https://raw.githubusercontent.com/mikel-brostrom/yolov8_tracking.git
= clone recursively
pip install -r requirements.txt
= install dependencies
----+++<details>++<details>++<details>++++++<summary>+++Custom object detection architecture+++</summary>+++ The trackers provided in this repo can be used with other object detectors than Yolov8. Make sure that the output of your detector has the following format: ```bash (x1,y1, x2, y2, obj, cls0, cls1, \..., clsn) ``` pass this directly to the tracker here: https://raw.githubusercontent.com/mikel-brostrom/Yolov5_StrongSORT_OSNet/a4bc0c38c33023fab9e5481861d9520eb81e28bc/track.py#L189+++</details>+++
$ python track.py --yolo-weights yolov8n.pt
= bboxes only
= bboxes + segmentation masks
----++++++++++++++MOT compliant results Can be saved to your experiment folder runs/track/_/ by bash python track.py --source ... --save-txt </details> ++++
bash python track.py --source ... --save-txt