Giter Site home page Giter Site logo

pprp / simple_deep_sort Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 47.63 MB

deep sort with yolov3. Modify darknet based yolov3 to pytorch based yolov3.

Home Page: https://github.com/ZQPei/deep_sort_pytorch

Python 98.24% Shell 1.76%
deep-sort mot pytorch yolov3 tracking-by-detection

simple_deep_sort's Introduction

Deep Sort with PyTorch

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
  • pytorch 0.4 or 1.x

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 YOLOv3/
wget https://pjreddie.com/media/files/yolov3.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. Run demo
usage: demo_yolo3_deepsort.py VIDEO_PATH
                              [--help] 
                              [--yolo_cfg YOLO_CFG]
                              [--yolo_weights YOLO_WEIGHTS]
                              [--yolo_names YOLO_NAMES]
                              [--conf_thresh CONF_THRESH]
                              [--nms_thresh NMS_THRESH]
                              [--deepsort_checkpoint DEEPSORT_CHECKPOINT]
                              [--max_dist MAX_DIST] [--ignore_display]
                              [--display_width DISPLAY_WIDTH]
                              [--display_height DISPLAY_HEIGHT]
                              [--save_path SAVE_PATH]          

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

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

simple_deep_sort's People

Contributors

pprp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

simple_deep_sort's Issues

FPS are 3 even on RTX 2080TI

Having RTX 2080TI I even write os.environ["CUDA_VISIBLE_DEVICES"] = "2,3" but FPS didn't increase. Any suggestion.
I observe code isn't running on GPU

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.