Video object tracking based on YOLOv7 and DeepSORT

Feng Yang, Xingle Zhang, Bo Liu · DOI

Abstract

Multiple object tracking (MOT) is an important technology in the field of computer vision, which is widely used in automatic driving, intelligent monitoring, behavior recognition and other directions. Among the current popular MOT methods based on deep learning, Detection Based Tracking (DBT) is the most widely used in industry, and the performance of them depend on their object detection network. At present, the DBT algorithm with good performance and the most widely used is YOLOv5-DeepSORT. Inspired by YOLOv5-DeepSORT, with the proposal of YOLOv7 network, which performs better in object detection, we apply YOLOv7 as the object detection part to the DeepSORT, and propose YOLOv7-DeepSORT. After experimental evaluation, compared with the previous YOLOv5-DeepSORT, YOLOv7-DeepSORT performances better in tracking accuracy.

1. Introduction

Multiple Object Tracking (MOT) is the backbone of technologies like autonomous driving and intelligent surveillance. The goal is to not only detect objects in a video frame but to assign them unique IDs and maintain those IDs across frames, even through occlusions, motion blur, and crowded scenes.

The industry standard approach is Detection-Based Tracking (DBT). In this paradigm, a detector finds objects in every frame, and a tracker links those detections over time. Consequently, the tracker's performance is heavily bottlenecked by the quality of the detector. While YOLOv5-DeepSORT has been a reliable workhorse, the release of YOLOv7—which offers better speed and accuracy—presented an opportunity to push the boundaries of tracking performance.

2. Methodology

The authors propose a modular pipeline that integrates the YOLOv7 detector into the DeepSORT framework. The process follows a structured flow from raw input to tracked output, as shown in Figure 1.

The YOLOv7-DeepSORT tracking pipeline architecture.

The process follows these key steps:

  1. Detection (YOLOv7): The system uses YOLOv7 to generate bounding boxes for targets. YOLOv7 introduces several architectural innovations, such as E-ELAN (Extended Efficient Layer Aggregation Network) to enhance learning without destroying gradient paths, and planned re-parameterized convolution to improve inference efficiency.
  2. Feature Extraction (ReID): A separate Re-Identification (ReID) model extracts appearance features from the detected bounding boxes. This helps the system remember what a specific object looks like, reducing "ID switches" when objects overlap.
  3. Prediction (Kalman Filter): A Kalman filter predicts the likely position of a target in the next frame based on its current velocity and trajectory.
  4. Data Association (Hungarian Algorithm): The system matches the predicted positions with the actual detections using a Matching Cascade (prioritizing recently seen targets) and IoU Matching (a fallback based on spatial overlap).

3. Experimental Evaluation

The model was evaluated using the MOT16 challenge dataset, specifically sequences 02, 04, 05, 09, 10, 11, and 13. The authors compared their YOLOv7-based approach against three variants of the previous benchmark: YOLOv5s, YOLOv5m, and YOLOv5l.

Comparative performance metrics of YOLOv5 and YOLOv7 based trackers on the MOT16 dataset.

Experimental results on a GTX 3080Ti (Table 1) showed that YOLOv7-DeepSORT outperformed all YOLOv5 variants in the most critical metrics:

  • MOTA (Multi-Object Tracking Accuracy): Achieved 40.82, outperforming YOLOv5l (40.77) and significantly beating YOLOv5s (39.60).
  • MOTP (Multi-Object Tracking Precision): Reached 82.01, the highest among the tested models.
  • IDF1 (ID F1 Score): Achieved 53.65, indicating a better balance between identification precision and recall compared to the YOLOv5 family.
  • ID Switches: While YOLOv7 had 514 switches, it represented a significant improvement over the large-scale YOLOv5l (547 switches), suggesting better stability in complex scenes.

4. Discussion and Conclusion

The study reinforces the idea that in DBT systems, the detector component is often the primary driver for performance. Simply upgrading the detector component led to measurable gains across almost all tracking metrics. YOLOv7’s use of "deep supervision" and E-ELAN allows it to provide cleaner, more stable bounding boxes, which in turn makes the Kalman filter’s job of trajectory prediction much easier.

While YOLOv7-DeepSORT is highly accurate, it still relies on a separate training process for the detector and the ReID model. This "two-step" approach can be computationally expensive. Future research could look toward more integrated frameworks, such as those based on Transformers (e.g., TransTrack or TrackFormer) or joint detection-and-tracking models (e.g., FairMOT) to perform detection and association in a single forward pass.

Summary updated

Abstract

Multiple object tracking (MOT) is an important technology in the field of computer vision, which is widely used in automatic driving, intelligent monitoring, behavior recognition and other directions. Among the current popular MOT methods based on deep learning, Detection Based Tracking (DBT) is the most widely used in industry, and the performance of them depend on their object detection network. At present, the DBT algorithm with good performance and the most widely used is YOLOv5-DeepSORT. Inspired by YOLOv5-DeepSORT, with the proposal of YOLOv7 network, which performs better in object detection, we apply YOLOv7 as the object detection part to the DeepSORT, and propose YOLOv7-DeepSORT. After experimental evaluation, compared with the previous YOLOv5-DeepSORT, YOLOv7-DeepSORT performances better in tracking accuracy.
BibTeX
@misc{yang2022video,
  author = {Feng Yang and Xingle Zhang and Bo Liu},
  title = {{Video object tracking based on YOLOv7 and DeepSORT}},
  year = {2022},
  eprint = {2207.12202},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.12202},
}
Figure