# Yolov5_DeepSort_Pytorch **Repository Path**: devine/Yolov5_DeepSort_Pytorch ## Basic Information - **Project Name**: Yolov5_DeepSort_Pytorch - **Description**: 原址:https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2024-11-08 - **Last Updated**: 2024-11-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Yolov5 + Deep Sort with PyTorch ![](Town.gif) ## Introduction This repository contains a moded version of PyTorch YOLOv5 (https://github.com/ultralytics/yolov5). It filters out every detection that is not a person. The detections of persons are then passed to a Deep Sort algorithm (https://github.com/ZQPei/deep_sort_pytorch) which tracks the persons. The reason behind the fact that it just tracks persons is that the deep association metric is trained on a person ONLY datatset. ## Description The implementation is based on two papers: - Simple Online and Realtime Tracking with a Deep Association Metric https://arxiv.org/abs/1703.07402 - YOLOv4: Optimal Speed and Accuracy of Object Detection https://arxiv.org/pdf/2004.10934.pdf ## Requirements Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run: `pip install -U -r requirements.txt` All dependencies are included in the associated docker images. Docker requirements are: - `nvidia-docker` - Nvidia Driver Version >= 440.44 ## Before you run the tracker 1. Clone the repository recursively: `git clone --recurse-submodules https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch.git` If you already cloned and forgot to use `--recurse-submodules` you can run `git submodule update --init` 2. Github block pushes of files larger than 100 MB (https://help.github.com/en/github/managing-large-files/conditions-for-large-files). Hence you need to download two different weights: the ones for yolo and the ones for deep sort - download the yolov5 weight from the latest realease https://github.com/ultralytics/yolov5/releases. Place the downlaoded `.pt` file under `yolov5/weights/` - download the deep sort weights from https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6. Place ckpt.t7 file under`deep_sort/deep/checkpoint/` ## Tracking Tracking can be run on most video formats ```bash python3 track.py --source ... ``` - Video: `--source file.mp4` - Webcam: `--source 0` - RTSP stream: `--source rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa` - HTTP stream: `--source http://wmccpinetop.axiscam.net/mjpg/video.mjpg` MOT compliant results can be saved to `inference/output` by ```bash python3 track.py --source ... --save-txt ``` ## Other information For more detailed information about the algorithms and their corresponding lisences used in this project access their official github implementations.