[Github 原文档] @Bobby Chen 记得留下小星星
It uses:
* YOLOv3 to detect objects on each of the video frames. - 目标检测算法
* Deep_SORT to track those objects over different frames. - 目标追踪算法
DeepSORT 是在 SORT 目标追踪基础上的改进版本,加入了行人重识别数据集上训练的深度学习模型,在实时目标追踪过程中,提取目标的表观特征进行最近邻匹配,提高了目标追踪的鲁棒性。
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.
DeepSORT Flowwork:
详细代码可参考 [Github 原文档] @Bobby Chen
1. 下载Git代码.
git clone https://github.com/yehengchen/Object-Detection-and-Tracking.git
2. 下载 [yolov3.weights] 并将 [ .weights] 文件放入 yolov3_sort/yolo-obj/
这里可以下载我训练的 [yolo_cc_0612.h5] 行人目标检测权重 for detection person/car/bicycle,etc.
3. 将你训练的 [ .weights ] 模型转换为 [ .h5 ] 模型:
$ python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
4. 运行 YOLO_DEEP_SORT:
$ python main.py -c [CLASS NAME] -i [INPUT VIDEO PATH]
$ python main.py -c person -i ./test_video/testvideo.avi
5. 根据需求可更换检测类别 [deep_sort_yolov3/yolo.py] 的__Line 100__
行可更换参数.
DeepSORT pre-trained weights using people-ReID datasets only for person, other targets is not good
if predicted_class != args["class"]:
continue
if predicted_class != 'person' and predicted_class != 'car':
continue
Object Re-identification model
cosine_metric_learning for training a metric feature representation to be used with the deep_sort tracker.
@article{yolov3,
title={YOLOv3: An Incremental Improvement},
author={Redmon, Joseph and Farhadi, Ali},
journal = {arXiv},
year={2018}
}
@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}
}