














摘" 要: 佩戴電動(dòng)車頭盔是安全騎行的重要保障,對(duì)電動(dòng)車駕乘人員佩戴頭盔進(jìn)行有效檢測在保障駕乘人員安全方面具有重要意義。電動(dòng)車頭盔檢測中存在目標(biāo)之間相互遮擋、復(fù)雜背景干擾、頭盔目標(biāo)小等問題,現(xiàn)有方法尚不能滿足復(fù)雜場景下電動(dòng)車頭盔檢測的要求,因此,提出一種改進(jìn)YOLOv5的復(fù)雜場景電動(dòng)車頭盔識(shí)別方法。首先,提出一種新的主干網(wǎng)絡(luò)結(jié)構(gòu)ML?CSPDarknet53,增強(qiáng)網(wǎng)絡(luò)的特征提取能力,引入輕量級(jí)上采樣算子CARAFE,利用特征圖語義信息擴(kuò)大感受野;其次,搭建坐標(biāo)卷積CoordConv模塊,增強(qiáng)網(wǎng)絡(luò)對(duì)空間信息的感知能力,并將WIoU v3作為邊界框損失函數(shù),降低低質(zhì)量樣本對(duì)模型性能的不利影響;最后,構(gòu)建了內(nèi)容豐富的頭盔檢測數(shù)據(jù)集對(duì)改進(jìn)算法進(jìn)行驗(yàn)證。實(shí)驗(yàn)結(jié)果表明,改進(jìn)后算法相較于原算法在精確度、召回率、mAP@0.5、mAP@0.5:0.95上分別提升了2.9%、3.0%、3.4%和2.2%,并且性能優(yōu)于其他主流檢測算法,滿足復(fù)雜道路交通場景下電動(dòng)車駕乘人員頭盔檢測的任務(wù)要求。
關(guān)鍵詞: 頭盔檢測; 改進(jìn)YOLOv5; 復(fù)雜場景; 目標(biāo)遮擋; 特征提取; 上采樣; 坐標(biāo)卷積; 損失函數(shù)
中圖分類號(hào): TN911.73?34; TP391.41" " " " " " " " "文獻(xiàn)標(biāo)識(shí)碼: A" " " " " " " " "文章編號(hào): 1004?373X(2025)01?0123?07
Improved YOLOv5 based electric bicycle helmet detection method in complex scenes
HAN Dongchen, ZHANG Fanghui, WANG Shiyang, DUAN Kepan, LI Ningxing, WANG Kai
(School of Electronic Information and Artificial Intelligence, Shaanxi University of Science and Technology, Xi’an 710021, China)
Abstract: Wearing an electric bicycle helmet is an important guarantee for safe riding, and it is of great significance to ensure the personnel safety by effectively detecting the helmet wearing of drivers and passengers of electric bicycles. Due to the factors of mutual occlusion of objects, complex background interferences, and excessive small size of the helmets (the objects) in the detection, the existing methods fail to meet the requirements of helmet detection in complex scenes, so this paper proposes an improved YOLOv5 based electric bicycle helmet recognition method in complex scenes. A new backbone network structure ML?CSPDarknet53 is proposed to enhance the feature extraction capability of the network. The lightweight up?sampling operator CARAFE is introduced. The semantic information of the feature map is used to expand the receptive field. A coordinate convolution CoordConv module is built to enhance the network′s perception of spatial information, and the WIoU (wise?IoU) v3 is taken as the bounding box loss function to reduce the adverse impact of low?quality samples on model performance. A rich helmet detection dataset is constructed to verify the improved algorithm. The experimental results show that the accuracy, recall rate, mAP@0.5 and mAP@0.5:0.95 of the proposed algorithm is improved by 2.9%, 3.0%, 3.4% and 2.2%, respectively, in comparison with that of the original algorithm, and the performance of the proposed algorithm is better than that of the other mainstream detection algorithms. Therefore, the proposed algorithm can meet the requirements of helmet detection of drivers and passengers of electric bicycles in complex scenes of road traffic.
Keywords: helmet detection; improved YOLOv5; complex scene; object occlusion; feature extraction; up?sampling; CoordConv; loss function
0" 引" 言
隨著我國電動(dòng)車社會(huì)保有量逐年增加,電動(dòng)車交通事故的發(fā)生日漸頻繁。電動(dòng)車事故中駕乘人員多是頭部首先受到撞擊,電動(dòng)車頭盔是保護(hù)駕乘人員頭部安全的關(guān)鍵裝備。摩托車頭盔可以降低72%的頭部損傷風(fēng)險(xiǎn)和39%的致死風(fēng)險(xiǎn)[1]。佩戴頭盔可以有效提高生還幾率。2020年公安部和交通管理局聯(lián)合部署了“一盔一帶”安全守護(hù)行動(dòng)[2],旨在全面整治電動(dòng)車用戶不戴頭盔等違法行為。……