计算机与现代化 ›› 2025, Vol. 0 ›› Issue (10): 24-31.doi: 10.3969/j.issn.1006-2475.2025.10.005

• 图像处理 • 上一篇    下一篇

改进YOLOv8的密集行人检测算法

  


  1. (1.西安工程大学计算机科学学院,陕西 西安 710600; 2.重庆旅游职业学院,重庆 409000)
  • 出版日期:2025-10-27 发布日期:2025-10-27
  • 作者简介: 作者简介:段警韦(1999—),男,山西临汾人,硕士研究生,研究方向:计算机视觉,目标跟踪,E-mail: 973104763@qq.com; 通信作者:陈亮(1977—),男,湖南怀化人,教授,CCF会员,博士,研究方向:人工智能,云计算与大数据,数据分析与可视化,E-mail: chenliang@xpu.edu.cn; 李雪(1998—),女,陕西宝鸡人,硕士研究生,研究方向:鱼眼矫正,图像拼接,E-mail:1078196792@qq.com; 刘蒙蒙(2000—),女,河南濮阳人,硕士研究生,研究方向:手势识别,图像处理,E-mail: liumeng1252@163.com; 刘晋宇(2002—),男,重庆黔江人,本科,研究方向:大数据技术,云计算,网络安全,数据可视化,人工智能,E-mail: 1138824768@qq.com。
  • 基金资助:
    陕西省教育厅重点科学研究计划项目(22JS021)
      

Dense Pedestrian Detection Algorithm Based on Improved YOLOv8


  1. (1. School of Computer Science, Xi’an Polytechnic University, Xi’an 710600, China;
    2. Chongqing Vocational Institute of Tourism, Chongqing 409000, China)
  • Online:2025-10-27 Published:2025-10-27

摘要:
摘要:为解决密集行人场景中由于背景复杂、人员密集、暗光环境和部分遮挡等原因造成密集行人检测中出现的漏检和错检问题,本文提出一种基于YOLOv8n优化的密集行人检测算法。该算法在主干网络中使用高效的GSConv卷积替换原有的卷积块,实现模型在保持识别精度的同时降低模型的计算量,并且使用GSConv卷积使得模型可以在普通的GPU上高效运行。将模型的特征融合网络替换为SlimNeck轻量级特征融合模块,通过减少特征通道的数量,提高模型的检测精度和检测速度。在特征提取网络中嵌入EMA注意力机制,增强模型对全局和局部信息的捕捉从而减少密集行人场景下出现的误检和漏检。采用Repulsion损失函数,以更好地处理密集行人检测中的重叠和近邻行人遮挡,减少目标之间的重叠和干扰,优化边界框回归。在CrowdHuman数据集上进行训练验证,实验结果表明改进后的YOLOv8模型相对于基线模型mAP值提升了4.5个百分点,在密集、遮挡、小目标、暗光环境下的可视化检测结果也优于基线模型。为密集行人检测提供了一种高效且鲁棒的解决方案。


关键词: 关键词:YOLOv8, 复杂场景, 密集行人识别, Repulsion损失函数, 目标检测, Slim-Neck

Abstract: Abstract: To address the issues of missed and false detections in dense pedestrian scenarios caused by complex backgrounds, high crowd density, low-light conditions, and partial occlusions, this paper proposes an optimized dense pedestrian detection algorithm based on YOLOv8n. The algorithm replaces the original convolutional blocks in the backbone network with efficient GSConv convolutions, reducing the model’s computational load while maintaining recognition accuracy. Additionally, GSConv convolutions enable the model to run efficiently on standard GPUs. The feature fusion network is replaced with the SlimNeck lightweight feature fusion module, which reduces the number of feature channels, thereby improving the model’s detection precision and speed. An EMA attention mechanism is embedded in the feature extraction network to enhance the model’s ability to capture both global and local information, thereby reducing false and missed detections in dense pedestrian scenarios. The algorithm also incorporates the Repulsion Loss function to better handle overlaps and occlusions among adjacent pedestrians in dense pedestrian detection, reducing interference between targets and optimizing bounding box regression. Training and validation on the CrowdHuman dataset demonstrate that the improved YOLOv8 model yields a 4.5 percentage points increase in mAP over the baseline. Furthermore, the model exhibits superior performance in dense crowds, occlusions, small-object detection, and low-light conditions, thereby offering an efficient and robust solution for dense pedestrian detection.

Key words: Key words: YOLOv8, complex scenarios, dense crowd recognition, repulsion loss function, object detection, Slim-Neck

中图分类号: