All Projects → ZQPei → Deep_sort_pytorch

ZQPei / Deep_sort_pytorch

Licence: mit
MOT using deepsort and yolov3 with pytorch

Programming Languages

python
139335 projects - #7 most used programming language
Cuda
1817 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Deep sort pytorch

yolo-deepsort-flask
Target detection and multi target tracking platform based on Yolo DeepSort and Flask.
Stars: ✭ 29 (-98.51%)
Mutual labels:  sort, cnn-model, yolov3, deep-sort, deepsort
yolo deepsort
Fast MOT base on yolo+deepsort, support yolo3 and yolo4
Stars: ✭ 47 (-97.59%)
Mutual labels:  sort, mot, yolov3, deepsort
YOLOX deepsort tracker
using yolox+deepsort for object-tracking
Stars: ✭ 228 (-88.3%)
Mutual labels:  yolov3, deep-sort, deepsort
yolo3 tensorflow
yolo3 implement by tensorflow, including mobilenet_v1, mobilenet_v2
Stars: ✭ 48 (-97.54%)
Mutual labels:  yolov3, yolo3
Deep sort yolov3
Real-time Multi-person tracker using YOLO v3 and deep_sort with tensorflow
Stars: ✭ 1,590 (-18.38%)
Mutual labels:  yolov3, deep-sort
Paddledetection
Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Stars: ✭ 5,799 (+197.69%)
Mutual labels:  yolov3, deepsort
rpi-urban-mobility-tracker
The easiest way to count pedestrians, cyclists, and vehicles on edge computing devices or live video feeds.
Stars: ✭ 75 (-96.15%)
Mutual labels:  deep-sort, deepsort
Accident-avoidance-deepsortyoloFCRN
An accident avoidance program that raises alert when nearby vehicles are moving at a relative speed faster than a threshold value, additionally it logs some data onto NEM-Mijin blockchain network
Stars: ✭ 18 (-99.08%)
Mutual labels:  yolov3, deepsort
Yolov5-deepsort-driverDistracted-driving-behavior-detection
基于深度学习的驾驶员分心驾驶行为(疲劳+危险行为)预警系统使用YOLOv5+Deepsort实现驾驶员的危险驾驶行为的预警监测
Stars: ✭ 107 (-94.51%)
Mutual labels:  sort, deepsort
Yolov3 Model Pruning
在 oxford hand 数据集上对 YOLOv3 做模型剪枝(network slimming)
Stars: ✭ 1,386 (-28.85%)
Mutual labels:  yolov3
Yolov3 tensorflow
Complete YOLO v3 TensorFlow implementation. Support training on your own dataset.
Stars: ✭ 1,498 (-23.1%)
Mutual labels:  yolov3
Cn sort
中文排序:按拼音/笔顺快速排序简体中文词组(百万数量级,可含中英/多音字)。如果对您有所帮助,欢迎点个star鼓励一下。
Stars: ✭ 102 (-94.76%)
Mutual labels:  sort
Tensorflow2.0 Examples
🙄 Difficult algorithm, Simple code.
Stars: ✭ 1,397 (-28.29%)
Mutual labels:  yolov3
Tensorflow Yolov4 Tflite
YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
Stars: ✭ 1,881 (-3.44%)
Mutual labels:  yolov3
Quadsort
Quadsort is a stable adaptive merge sort which is faster than quicksort.
Stars: ✭ 1,385 (-28.9%)
Mutual labels:  sort
Yolov3 On Android
Build an Android App for deploying YOLO V3 source code on mobile phone directly.
Stars: ✭ 113 (-94.2%)
Mutual labels:  yolov3
Jsonabc
Sorts JSON object alphabetically. It supports nested objects, arrays and collections. Works offline and beautifies JSON object too.
Stars: ✭ 100 (-94.87%)
Mutual labels:  sort
Snowonder
🔮 Magical import declarations formatter for Xcode
Stars: ✭ 100 (-94.87%)
Mutual labels:  sort
Channeltagview
一个新闻频道管理view
Stars: ✭ 115 (-94.1%)
Mutual labels:  sort
Jortsort
the official website for jortSorting
Stars: ✭ 112 (-94.25%)
Mutual labels:  sort

Deep Sort with PyTorch

Update(1-1-2020)

Changes

  • fix bugs
  • refactor code
  • accerate detection by adding nms on gpu

Latest Update(07-22)

Changes

  • bug fix (Thanks @JieChen91 and @yingsen1 for bug reporting).
  • using batch for feature extracting for each frame, which lead to a small speed up.
  • code improvement.

Futher improvement direction

  • Train detector on specific dataset rather than the official one.
  • Retrain REID model on pedestrain dataset for better performance.
  • Replace YOLOv3 detector with advanced ones.

Any contributions to this repository is welcome!

Introduction

This is an implement of MOT tracking algorithm deep sort. Deep sort is basicly the same with sort but added a CNN model to extract features in image of human part bounded by a detector. This CNN model is indeed a RE-ID model and the detector used in PAPER is FasterRCNN , and the original source code is HERE.
However in original code, the CNN model is implemented with tensorflow, which I'm not familier with. SO I re-implemented the CNN feature extraction model with PyTorch, and changed the CNN model a little bit. Also, I use YOLOv3 to generate bboxes instead of FasterRCNN.

Dependencies

  • python 3 (python2 not sure)
  • numpy
  • scipy
  • opencv-python
  • sklearn
  • torch >= 0.4
  • torchvision >= 0.1
  • pillow
  • vizer
  • edict

Quick Start

  1. Check all dependencies installed
pip install -r requirements.txt

for user in china, you can specify pypi source to accelerate install like:

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
  1. Clone this repository
git clone [email protected]:ZQPei/deep_sort_pytorch.git
  1. Download YOLOv3 parameters
cd detector/YOLOv3/weight/
wget https://pjreddie.com/media/files/yolov3.weights
wget https://pjreddie.com/media/files/yolov3-tiny.weights
cd ../../../
  1. Download deepsort parameters ckpt.t7
cd deep_sort/deep/checkpoint
# download ckpt.t7 from
https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6 to this folder
cd ../../../
  1. Compile nms module
cd detector/YOLOv3/nms
sh build.sh
cd ../../..

Notice: If compiling failed, the simplist way is to **Upgrade your pytorch >= 1.1 and torchvision >= 0.3" and you can avoid the troublesome compiling problems which are most likely caused by either gcc version too low or libraries missing.

  1. (Optional) Prepare third party submodules

fast-reid

This library supports bagtricks, AGW and other mainstream ReID methods through providing an fast-reid adapter.

to prepare our bundled fast-reid, then follow instructions in its README to install it.

Please refer to configs/fastreid.yaml for a sample of using fast-reid. See Model Zoo for available methods and trained models.

MMDetection

This library supports Faster R-CNN and other mainstream detection methods through providing an MMDetection adapter.

to prepare our bundled MMDetection, then follow instructions in its README to install it.

Please refer to configs/mmdet.yaml for a sample of using MMDetection. See Model Zoo for available methods and trained models.

Run

git submodule update --init --recursive
  1. Run demo
usage: deepsort.py [-h]
                   [--fastreid]
                   [--config_fastreid CONFIG_FASTREID]
                   [--mmdet]
                   [--config_mmdetection CONFIG_MMDETECTION]
                   [--config_detection CONFIG_DETECTION]
                   [--config_deepsort CONFIG_DEEPSORT] [--display]
                   [--frame_interval FRAME_INTERVAL]
                   [--display_width DISPLAY_WIDTH]
                   [--display_height DISPLAY_HEIGHT] [--save_path SAVE_PATH]
                   [--cpu] [--camera CAM]
                   VIDEO_PATH         

# yolov3 + deepsort
python deepsort.py [VIDEO_PATH]

# yolov3_tiny + deepsort
python deepsort.py [VIDEO_PATH] --config_detection ./configs/yolov3_tiny.yaml

# yolov3 + deepsort on webcam
python3 deepsort.py /dev/video0 --camera 0

# yolov3_tiny + deepsort on webcam
python3 deepsort.py /dev/video0 --config_detection ./configs/yolov3_tiny.yaml --camera 0

# fast-reid + deepsort
python deepsort.py [VIDEO_PATH] --fastreid [--config_fastreid ./configs/fastreid.yaml]

# MMDetection + deepsort
python deepsort.py [VIDEO_PATH] --mmdet [--config_mmdetection ./configs/mmdet.yaml]

Use --display to enable display.
Results will be saved to ./output/results.avi and ./output/results.txt.

All files above can also be accessed from BaiduDisk!
linker:BaiduDisk passwd:fbuw

Training the RE-ID model

The original model used in paper is in original_model.py, and its parameter here original_ckpt.t7.

To train the model, first you need download Market1501 dataset or Mars dataset.

Then you can try train.py to train your own parameter and evaluate it using test.py and evaluate.py. train.jpg

Demo videos and images

demo.avi demo2.avi

1.jpg 2.jpg

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].