作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• •    

面向校园场景的改进YOLOv8与OCSORT多目标跟踪算法

  • 发布日期:2026-02-12

An Improved YOLOv8 and OCSORT Multi-Object Tracking Algo-rithm for Campus Scenarios

  • Published:2026-02-12

摘要: 为满足校园场景中高效、准确的多目标跟踪(MOT)需求,提出了一种基于改进YOLOv8目标检测算法与OCSORT多目标跟踪算法的解决方案。针对校园环境复杂的背景与人群分布,构建了特定场景特征的数据集,以优化算法的表现。为提高行人小目标检测精度,引入高效的多尺度注意力机制(EMA)模块,并采用自校准卷积(SCConv)模块替代YOLOv8中的跨阶段部分融合(C2f)模块,从而有效提升了检测效果。在多目标跟踪中,针对关联准确度低和计算开销较大的问题,提出了一种创新的解决方案。首先,提出了基于行人重识别(ReID)的ID初始化(IIR)策略,有效解决了行人短暂离开后重新出现时的ID不一致问题。其次,设计了一种结合帧间形状相似度(SSF)与目标框交并比(IoU)的数据关联策略,进一步提高了连续帧间目标匹配的准确性。最后,为了提高外观相似度计算的效率,提出了分阶段数据关联(SDA)策略,该策略在保证较高精度的同时减少了计算开销。实验结果表明,所提方法在校园场景中有效提升了行人检测精度与跟踪准确性,并在复杂背景下表现出良好的鲁棒性与较高的帧率,为智能校园安防和人群行为分析提供了高效、可靠的技术支持。

Abstract: In order to meet the needs of efficient and accurate multi-object tracking (MOT) in campus scenarios, a solution based on the improved YOLOv8 object detection algorithm and the OCSORT multi-object tracking algorithm is proposed. In view of the complex background and crowd distribution of the campus scenarios, a dataset with specific scene features is constructed to optimize the performance of the algorithm. In order to improve the accuracy of pedestrian small object detection, an efficient multi-scale attention (EMA) module is introduced, and the self-calibrated convolutions (SCConv) module is used to replace the cross-stage partial fusion (C2f) module in YOLOv8, which effectively improves the detection effect. In multi-object tracking, an innovative solution is proposed to address the problems of low association accuracy and high computational overhead. Firstly, an ID initialization (IIR) strategy based on person re-identification (ReID) is proposed, which effectively solves the problem of ID inconsistency when pedestrians reappear after leaving for a short time. Secondly, a data association strategy combining shape similarity between frames (SSF) and object box intersection over union (IoU) is designed to further improve the accuracy of object matching between consecutive frames. Finally, in order to improve the efficiency of appearance similarity calculation, a stage-wise data association (SDA) strategy is proposed, which reduces the computational overhead while ensuring high accuracy. Experimental results show that the proposed method effectively improves the accuracy of pedestrian detection and tracking in campus scenarios and exhibits good robustness and a high frame rate in complex backgrounds, providing efficient and reliable technical support for smart campus security and crowd behavior analysis.