-
Clone the repository
-
Install dependencies
pip install -r requirements.txt
Download weights and place it in yolov5/weights folder
Add a video to data/videos folder and run the following command.
python track.py --source data/videos/test.mp4 --yolo_model yolov5/weights/crowdhuman_yolov5m.pt --classes 0 --show-vid --save-vid
Results are saved to folder track/expN
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
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
Choose a ReID model based on your needs from this ReID model zoo
$ python track.py --source 0 --deep_sort_model osnet_x1_0
nasnsetmobile
resnext101_32x8d
...
@misc{yolov5deepsort2020,
title={Real-time multi-object tracker using YOLOv5 and deep sort},
author={Mikel Broström},
howpublished = {\url{https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch}},
year={2020}
}