# deep_sort **Repository Path**: funweb/deep_sort ## Basic Information - **Project Name**: deep_sort - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-22 - **Last Updated**: 2021-12-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Deep SORT ## Introduction This repository contains code for *Simple Online and Realtime Tracking with a Deep Association Metric* (Deep SORT). We extend the original [SORT](https://github.com/abewley/sort) algorithm to integrate appearance information based on a deep appearance descriptor. See the [arXiv preprint](https://arxiv.org/abs/1703.07402) for more information. 此存储库包含用于*使用深度关联度量*(深度排序)进行简单在线和实时跟踪的代码。 我们扩展了原始[排序](https://github.com/abewley/sort)算法 基于深层外观描述符集成外观信息。 参见[arXiv预印本](https://arxiv.org/abs/1703.07402)了解更多信息。 ## Dependencies 该代码与Python 2.7和3兼容。运行跟踪器需要以下依赖项: * NumPy * sklearn * OpenCV 此外,特征生成需要TensorFlow(>=1.0)。 ## Installation 首先,克隆存储库: ``` git clone https://github.com/nwojke/deep_sort.git ``` 然后,从[此处](https://drive.google.com/open?id=18fKzfqnqhqW3s9zwsCbnVJ5XF2JFeqMp)下载预生成的检测和CNN检查点文件 *注:*我们预生成检测的候选对象位置取自以下文件: ``` F. Yu, W. Li, Q. Li, Y. Liu, X. Shi, J. Yan. POI: Multiple Object Tracking with High Performance Detection and Appearance Feature. In BMTT, SenseTime Group Limited, 2016. ``` 我们用一个定制的深卷积神经网络(见下文)替换了外观描述符。 ## Running the tracker 以下示例在[MOT16](https://motchallenge.net/data/MOT16/)基准测试]之一上启动跟踪器序列。 我们假设资源已提取到存储库根目录,并且MOT16基准数据位于`/MOT16`: ``` python deep_sort_app.py \ --sequence_dir=./MOT16/test/MOT16-06 \ --detection_file=./resources/detections/MOT16_POI_test/MOT16-06.npy \ --min_confidence=0.3 \ --nn_budget=100 \ --display=True ``` 运行 `python deep_sort_app.py -h` 用于查看可用选项的概述。 存储库中还有脚本,用于可视化结果、生成视频和评估MOT挑战基准。 ## Generating detections 除了主跟踪应用程序之外,该存储库还包含一个脚本,用于生成用于人员重新识别的特征,适合使用余弦相似性比较行人边界框的视觉外观。 以下示例根据标准MOT质询检测生成这些功能。同样,我们假设资源已提取到存储库根目录,并且MOT16数据位于`/MOT16`: ``` python tools/generate_detections.py \ --model=resources/networks/mars-small128.pb \ --mot_dir=./MOT16/train \ --output_dir=./resources/detections/MOT16_train ``` 该模型由TensorFlow 1.5生成。如果遇到不兼容,请重新导出冻结的推理图以获得新的 `mars-small128.pb`与您的版本兼容: ``` python tools/freeze_model.py ``` ``generate_detections.py`` 为MOT16数据集的每个序列存储NumPy本机格式的单独二进制文件。每个文件包含一个形状为 `Nx138` 的数组,其中 `N` 是相应MOT序列中的检测数。此数组的前10列包含从输入文件复制的原始MOT检测。其余128列存储外观描述符。此命令生成的文件可用作 `deep_sort_app.py` 应用程序的输入。 **注意**:如果 `python tools/generate_detections.py` 引发TensorFlow错误,请尝试向 `--model` 参数传递绝对路径。这在某些情况下可能会有所帮助。 ## Training the model 为了训练深度关联度量模型,我们使用了一种新的[余弦度量学习](https://github.com/nwojke/cosine_metric_learning)作为单独的存储库提供的方法。 ## Highlevel overview of source files In the top-level directory are executable scripts to execute, evaluate, and visualize the tracker. The main entry point is in `deep_sort_app.py`. This file runs the tracker on a MOTChallenge sequence. 顶层目录中有可执行脚本,用于执行、评估和可视化跟踪器。主要入口点是 `deep_sort_app.py`。此文件在MOTChallenge 序列上运行跟踪器。 In package `deep_sort` is the main tracking code: 包 ` deep_sort`中的主跟踪代码为: * `detection.py`: 检测基类。 * `kalman_filter.py`: 图像空间滤波的卡尔曼滤波实现和具体参数化。 * `linear_assignment.py`: 此模块包含最小成本匹配和匹配级联的代码。 * `iou_matching.py`: 此模块包含IOU匹配度量。 * `nn_matching.py`: 用于最近邻匹配度量的模块。 * `track.py`: 轨迹类包含单目标轨迹数据,如卡尔曼状态、命中数、未命中、命中条纹、相关特征向量等。 * `tracker.py`: 这是多目标跟踪器类。 `deep_sort_app.py` 需要以自定义格式存储在中的检测。npy文件。可以使用以下公式从MOT质询检测中计算这些值: `generate_detections.py`. 我们也提供了 [pre-generated detections](https://drive.google.com/open?id=1VVqtL0klSUvLnmBKS89il1EKC3IxUBVK). ## Citing DeepSORT 如果你觉得这项研究在你的研究中是有用的,请考虑引用以下论文: @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} }