计算机科学 ›› 2025, Vol. 52 ›› Issue (6A): 240900167-8.doi: 10.11896/jsjkx.240900167

• 图像处理&多媒体技术 • 上一篇    下一篇

基于YOLOv8n的电动自行车佩戴头盔检测算法改进

白少康, 王宝会, 陈继轩   

  1. 北京航空航天大学 北京 100080
  • 出版日期:2025-06-16 发布日期:2025-06-12
  • 通讯作者: 王宝会(wangbh@buaa.edu.cn)
  • 作者简介:(leobai@buaa.edu.cn)

Improved Helmet Detection Algorithm of Electric Bicycle Based on YOLOv8n

BAI Shaokang, WANG Baohui, CHEN Jixuan   

  1. Beihang University,Beijing 100080,China
  • Online:2025-06-16 Published:2025-06-12
  • About author:BAI Shaokang,born in 1991,postgra-duate.His main research interests include computer graphics and nerual networks.
    WANG Baohui,born in 1973,senior engineer,master supervisor.His main research interests include software architecture,big data,artificial intelligence,etc.

摘要: 随着交通事业的不断发展,电动自行车在行驶过程中佩戴头盔的必要性得到了不断验证。同时,电动自行车驾驶佩戴头盔检测在深度学习领域也得到了广泛的研究。目前电动自行车驾驶佩戴头盔在密集场景下存在检测难度大、小目标检测困难等问题,同时为了实现更好在移动端部署需要选择轻量化的模型。因此,提出了一种基于YOLOv8n的电动自行车佩戴头盔检测改进算法。首先YOLOv8n是YOLOv8系列模型中最轻量的模型,能够更好地在移动端部署;此外在YOLOv8n主干网络引入可切换的空洞卷积,在不增加计算量的前提下提升了YOLOv8n在密集场景下提取特征的能力;在YOLOv8n的图像金字塔特征融合网络末尾融合三重注意力机制,加强对YOLOv8n模型对不同尺度特征融合信息中重要特征的提取能力;最后添加大尺寸特征信息与小尺寸特征信息融合,提升对小目标的检测效果。最终在保证YOLOv8n轻量化的同时,使用改进后的模型在自制的验证集中mAP@50、mAP@50-90、召回率分别提升2.7%,2.8%,2.5%,因此所提方法具有一定的实用意义及科研意义。

关键词: 电动自行车, 头盔检测, YOLOv8n, 空洞卷积, 注意力机制

Abstract: With the continuous advancement of the transportation industry,the necessity of helmet-wearing during the riding of electric bicycles has been consistently verified.Meanwhile,the detection of helmet-wearing by electric bicycle riders has also received extensive research in the domain of deep learning.Currently,there exist issues such as significant detection difficulties in dense scenarios and challenges in detecting small targets when it comes to helmet-wearing by electric bicycle riders.Concurrently,in order to achieve more effective deployment on mobile terminals,a lightweight model needs to be selected.Hence,an improved detection algorithm for helmet-wearing by electric bicycle riders based on YOLOv8n has been proposed.Firstly,YOLOv8n is the most lightweight model among the YOLOv8 series,enabling better deployment on mobile devices.Additionally,a switchable atrous convolution is introduced into the backbone network of YOLOv8n,enhancing the feature extraction capability of YOLOv8n in dense scenes without increasing the computational load.At the end of the image pyramid feature fusion network of YOLOv8n,a triple attention mechanism is integrated to strengthen the extraction ability of important features from the fused information of different-scale features by the YOLOv8n model.Finally,the fusion of large-sized feature information with small-sized feature information is added to improve the detection effect of small targets.Ultimately,while ensuring the lightweight nature of YOLOv8n,when using the improved model in the self-constructed validation set,the mAP@50,mAP@50-90,and recall rate have increased by 2.7%,2.8% and 2.5%,respectively.Therefore,the proposed method holds certain practical and scientific significance.

Key words: Electric bicycle, Helemet detection, YOLOv8n, Empty convolution, Attention mechanis

中图分类号: 

  • TP312
[1]YU Y,PENG J J,LI Q F,et al.Helmet wearing among e-bikers in Shanghai:On-site observational study[J].ShanghaiJournal of Preventive Medicine,2018(9):730-735
[2]LU X,CHEN D,LIU W C,et al.Characteristics of road traffic injuries caused by electric bicycles in Suzhou during 2017-2019[J].J Trauma Surg,2021(5):375-379.
[3]KRIZHEVSKY A,SUTSKEVER I,HINTON G.ImageNetClassification with Deep Convolutional Neural Networks[J].Advances in Neural Information Processing Systems,2012,25(2).
[4]GIRSHICK R,DONAHUE J,DARRELL T,et al,Rich feature hierarchies for accurate object detection and semantic segmentation[C]//Proceedings of the 2014 IEEE Conferenceon ComputerVision and Pattern Recognition.Columbus:IEEE,2014:580-587.
[5]REN S,HE K,GIRSHICK R,et al.Faster R-CNN:Towards Real-Time Object Detection with Region Proposal Networks[J].IEEE Transactions on Pattern Analysis & Machine Intelligence,2017,39(6):1137-1149.
[6]LIN T Y,DOLLAR P,GIRSHICK R,et al.Feature Pyramid Networks for Object Detection[C]//CVPR.2017:936-944.
[7]HE K,GKIOXARI G,PIOTR D,et al.Mask R-CNN[J].IEEE Transactions on Pattern Analysis & Machine Intelligence,2017.2980-2988.
[8]GE S M,GUO W J,LI C Y,et al.Masked Face Recognition with Generative-to-Discriminative Representations[J].arXiv:2405.16761,2024.
[9]WANG G,YUAN Y,LI J,et al.Receptive Multi-GranularityRepresentation for Person Re-Identification[C]//IEEE Transactions on Image Processing.2020:6096-6109.
[10]JIJI C V,SHINE L.Automated detection of helmet on motorcyclists from traffic surveillance videos:a comparative analysis using hand-crafted features and CNN[J].Multimedia Tools and Applications,2020:1-21.
[11]MISRAA A K,MANOHAR NMISTRY J,AGARWAL M,et al.An automatic detection of helmeted and non-helmeted motorcyclist with license plate extraction using convolutional neural network[C]//Seventh International Conference on Image Processing Theory,Tools and Applications(IPTA).IEEE,2017:1-6.
[12]CHATTERJI S,DASGUPTA M,BANDYOPADHYAY O.Automated helmet detection for multiple motorcycle riders using CNN[C]//IEEE Conference on Information and CommunicationTechnology.IEEE,2019:1-4.
[13]XU H,DENG Z H.Helmet Wearing Detection Algorithm byImproved YOLOv5[J],Software Guide,2024,8:33-42.
[14]ZHU X,LYU S,WANG X,et al.TPH-YOLOv5:ImprovedYOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-captured Scenarios[J].arXiv.2108.11539,2021.
[15]XU C G.Rearch real-time detection algorithm for helmets and reflective vests based on YOLOv5s[J].Computer Era,2023,10:110-115.
[16]HAN K,WANG Y,TIAN Q,et al.GhostNet:More Features From Cheap Operations[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).IEEE,2020.
[17]WANG J,CHEN K,XU R,et al.CARAFE:Content-Aware ReAssembly of Features[C]//2019 IEEE/CVF International Conference on Computer Vision.2019.
[18]QIAO S,CHEN L C,YUILLE A.DetectoRS:Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution[J].arXiv:2006.02334,2020.
[19]MISRA D,NALAMADA T,ARASANIPALAI A U,et al.Rotate to Attend:Convolutional Triplet Attention Module[J].ar-Xiv:2010.03045,2020.
[20]HU J,SHEN L,SUN G,et al.Squeeze-and-Excitation Networks[C]//2018 IEEE/CVF Conference on Computer Vision and Patern Recognition.2018.
[21]WOO S,PARK J,LEE J Y,et al.CBAM:Convolutional Block Attention Module[J].arXiv:1807.06521,2018.
[22]PARK J,WOO S,LEE J Y,et al.BAM:Bottleneck Attention Module[J].arXiv:1807.06514,2018.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!