Skip to content

WYuei/deepsort_yolov3

Repository files navigation

YOLOv3 + Deep_SORT

Object Tracking & Counting Demo - [YouTube] [BiliBili_V1] [BiliBili_V2] [Chinese Version]

Requirement

Development Environment: Deep-Learning-Environment-Setup

  • OpenCV
  • sklean
  • pillow
  • numpy 1.15.0
  • tensorflow-gpu 1.13.1
  • CUDA 10.0

It uses:

  • Detection: YOLOv3 to detect objects on each of the video frames. - 用自己的数据训练YOLOv3模型

  • Tracking: Deep_SORT to track those objects over different frames.

This repository contains code for Simple Online and Realtime Tracking with a Deep Association Metric (Deep SORT). We extend the original SORT algorithm to integrate appearance information based on a deep appearance descriptor. See the arXiv preprint for more information.

Quick Start

0.Requirements

pip install -r requirements.txt

1. Download the code to your computer.

git clone https://github.com/yehengchen/Object-Detection-and-Tracking.git

2. Download [yolov3.weights] and place it in deep_sort_yolov3/model_data/

Here you can download my trained [yolo-spp.h5] - t13k weights for detecting person/car/bicycle,etc.

3. Convert the Darknet YOLO model to a Keras model:

$ python convert.py model_data/yolov3.cfg model_data/yolov3.weights model_data/yolo.h5

4. Run the YOLO_DEEP_SORT:

$ python main.py -c [CLASS NAME] -i [INPUT VIDEO PATH]

$ python main.py -c person -i ./test_video/testvideo.avi

5. Can change [deep_sort_yolov3/yolo.py] __Line 100__ to your tracking object

DeepSORT pre-trained weights using people-ReID datasets only for person

    if predicted_class != args["class"]:
               continue
    
    if predicted_class != 'person' and predicted_class != 'car':
               continue

Train on Market1501 & MARS

People Re-identification model

cosine_metric_learning for training a metric feature representation to be used with the deep_sort tracker.

Citation

YOLOv3 :

@article{yolov3,
title={YOLOv3: An Incremental Improvement},
author={Redmon, Joseph and Farhadi, Ali},
journal = {arXiv},
year={2018}
}

Deep_SORT :

@inproceedings{Wojke2017simple,
title={Simple Online and Realtime Tracking with a Deep Association Metric},
author={Wojke, Nicolai and Bewley, Alex and Paulus, Dietrich},
booktitle={2017 IEEE International Conference on Image Processing (ICIP)},
year={2017},
pages={3645--3649},
organization={IEEE},
doi={10.1109/ICIP.2017.8296962}
}

@inproceedings{Wojke2018deep,
title={Deep Cosine Metric Learning for Person Re-identification},
author={Wojke, Nicolai and Bewley, Alex},
booktitle={2018 IEEE Winter Conference on Applications of Computer Vision (WACV)},
year={2018},
pages={748--756},
organization={IEEE},
doi={10.1109/WACV.2018.00087}
}

Reference

Github:deep_sort@Nicolai Wojke nwojke

Github:deep_sort_yolov3@Qidian213

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages