zxt881108 / deep_sort_pytorch

MOT tracking using deepsort yolo3 with pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deep Sort with PyTorch

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 YOLO3 to generate bboxes instead of FasterRCNN.

Dependencies

  • python 3 (python2 not sure)
  • numpy
  • cv2
  • sklearn
  • pytorch 0.4.0

Quick Start

  1. Check all dependencies installed

  2. Clone this repository

git clone git@github.com:ZQPei/deep_sort_pytorch.git
  1. Download YOLO3 parameters
cd YOLO3/
wget https://pjreddie.com/media/files/yolov3.weights
cd ..
  1. Download deepsort parameters ckpt.t7
cd deep/checkpoint
# download ckpt.t7 from 
https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6 to this folder
cd ../../
  1. Run demo
python demo_yolo3_deepsort.py [YOUR_VIDEO_PATH]

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

All files can also be accessed by BaiduDisk!
linker:https://pan.baidu.com/s/1TEFdef9tkJVT0Vf0DUZvrg
passwd:1eqo

References

About

MOT tracking using deepsort yolo3 with pytorch

License:GNU General Public License v3.0


Languages

Language:Python 100.0%