《计算机应用》唯一官方网站 ›› 2023, Vol. 43 ›› Issue (4): 1291-1296.DOI: 10.11772/j.issn.1001-9081.2022020313
• 多媒体计算与计算机仿真 • 上一篇
收稿日期:
2022-03-18
修回日期:
2022-07-14
接受日期:
2022-07-18
发布日期:
2022-08-16
出版日期:
2023-04-10
通讯作者:
齐琦
作者简介:
朱周华(1976—),女,陕西西安人,副教授,硕士,主要研究方向:机器学习、目标检测、数字信号处理;
基金资助:
Zhouhua ZHU, Qi QI()
Received:
2022-03-18
Revised:
2022-07-14
Accepted:
2022-07-18
Online:
2022-08-16
Published:
2023-04-10
Contact:
Qi QI
About author:
ZHU Zhouhua, born in 1976, M. S., associate professor. Her research interests include machine learning, object detection, digital signal processing.
Supported by:
摘要:
针对目前电动车头盔小目标检测的精度低、鲁棒性差,相关系统不完善等问题,提出了基于改进YOLOv5s的电动车头盔检测算法。所提算法引入卷积块注意力模块(CBAM)和协调注意力(CA)模块,采用改进的非极大值抑制(NMS),即DIoU-NMS(Distance Intersection over Union-Non Maximum Suppression);同时增加多尺度特征融合检测,并结合密集连接网络改善特征提取效果;最后,建立了电动车驾驶人头盔检测系统。在自建的电动车头盔佩戴数据集上,当交并比(IoU)为0.5时,所提算法的平均精度均值(mAP)比原始YOLOv5s提升了7.1个百分点,召回率(Recall)提升了1.6个百分点。实验结果表明,所提改进的YOLOv5s算法更能满足在实际情况中对电动车及驾驶员头盔的检测精度要求,一定程度上降低了电动车交通事故的发生率。
中图分类号:
朱周华, 齐琦. 基于改进YOLOv5s电动车头盔的自动检测与识别[J]. 计算机应用, 2023, 43(4): 1291-1296.
Zhouhua ZHU, Qi QI. Automatic detection and recognition of electric vehicle helmet based on improved YOLOv5s[J]. Journal of Computer Applications, 2023, 43(4): 1291-1296.
类别 | 精度 | 召回率 | mAP0.5 | |||
---|---|---|---|---|---|---|
改进前 | 改进后 | 改进前 | 改进后 | 改进前 | 改进后 | |
平均值 | 79.3 | 88.2 | 83.7 | 85.3 | 84.2 | 91.3 |
electric | 84.2 | 91.6 | 91.5 | 91.5 | 93.1 | 96.9 |
helmet | 86.2 | 90.5 | 88.5 | 92.6 | 91.1 | 96.2 |
no helmet | 67.5 | 82.4 | 71.1 | 71.8 | 68.4 | 80.8 |
表1 YOLOv5s改进前后的性能对比 (%)
Tab. 1 Performance comparison of YOLOv5s before and after improvement
类别 | 精度 | 召回率 | mAP0.5 | |||
---|---|---|---|---|---|---|
改进前 | 改进后 | 改进前 | 改进后 | 改进前 | 改进后 | |
平均值 | 79.3 | 88.2 | 83.7 | 85.3 | 84.2 | 91.3 |
electric | 84.2 | 91.6 | 91.5 | 91.5 | 93.1 | 96.9 |
helmet | 86.2 | 90.5 | 88.5 | 92.6 | 91.1 | 96.2 |
no helmet | 67.5 | 82.4 | 71.1 | 71.8 | 68.4 | 80.8 |
算法 | 精度 | 召回率 | mAP0.5 |
---|---|---|---|
文献[ | 96.0 | 73.0 | 85.0 |
本文算法 | 88.2 | 86.4 | 93.1 |
表2 不同算法的性能对比 (%)
Tab. 2 Performance comparison of different algorithms
算法 | 精度 | 召回率 | mAP0.5 |
---|---|---|---|
文献[ | 96.0 | 73.0 | 85.0 |
本文算法 | 88.2 | 86.4 | 93.1 |
模型 | 精度 | 召回率 | mAP0.5 |
---|---|---|---|
原始YOLOv5s | 79.3 | 83.7 | 84.2 |
YOLOv5s+注意力机制 | 81.6 | 84.5 | 86.8 |
YOLOv5s+DIoU-NMS | 80.1 | 84.1 | 86.4 |
YOLOv5s+多尺度特征融合 | 80.8 | 83.9 | 87.6 |
表3 YOLOv5s消融实验结果 (%)
Tab. 3 YOLOv5s ablation experiment results
模型 | 精度 | 召回率 | mAP0.5 |
---|---|---|---|
原始YOLOv5s | 79.3 | 83.7 | 84.2 |
YOLOv5s+注意力机制 | 81.6 | 84.5 | 86.8 |
YOLOv5s+DIoU-NMS | 80.1 | 84.1 | 86.4 |
YOLOv5s+多尺度特征融合 | 80.8 | 83.9 | 87.6 |
算法 | 精度 | 召回率 | mAP0.5 |
---|---|---|---|
YOLOv5s | 79.3 | 83.7 | 84.2 |
YOLOv5m | 83.6 | 85.6 | 88.2 |
YOLOv5l | 84.8 | 86.1 | 90.1 |
YOLOv5x | 84.1 | 85.5 | 89.4 |
改进YOLOv5s | 88.2 | 86.4 | 91.3 |
表4 本文算法与YOLOv5系列算法性能对比 (%)
Tab. 4 Performance comparison between the proposed algorithm and YOLOv5 series algorithms
算法 | 精度 | 召回率 | mAP0.5 |
---|---|---|---|
YOLOv5s | 79.3 | 83.7 | 84.2 |
YOLOv5m | 83.6 | 85.6 | 88.2 |
YOLOv5l | 84.8 | 86.1 | 90.1 |
YOLOv5x | 84.1 | 85.5 | 89.4 |
改进YOLOv5s | 88.2 | 86.4 | 91.3 |
1 | REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6):1137-1149. 10.1109/tpami.2016.2577031 |
2 | HE K M, GKIOXARI G, DOLLÁR P, et al. Mask R-CNN[C]// Proceedings of the 2017 IEEE International Conference on Computer Vision. Piscataway: IEEE, 2017: 2980-2988. 10.1109/iccv.2017.322 |
3 | REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified real-time object detection[C]// Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2016:779-788. 10.1109/cvpr.2016.91 |
4 | LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot multibox detector[C]// Proceedings of the 2014 European Conference on Computer Vision, LNCS 9905. Cham: Springer, 2016:21-37. |
5 | LIN T Y, GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[C]// Proceedings of the 2017 IEEE International Conference on Computer Vision. Piscataway: IEEE, 2017: 2999-3007. 10.1109/iccv.2017.324 |
6 | ZHANG S, CHI C, YAO Y, et al. Bridging the gap between anchor-based and anchor-free detection via adaptive training sample selection[C]// Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2020:9756-9765. 10.1109/cvpr42600.2020.00978 |
7 | YANG Z, LIU S, HU H, et al. RepPoints: point set representation for object detection[C]// Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision. Piscataway: IEEE, 2019:9656-9665. 10.1109/iccv.2019.00975 |
8 | TIAN Z, SHEN C H, CHEN H, et al. FCOS: fully convolutional one-stage object detection[C]// Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision. Piscataway: IEEE, 2019:9626-9635. 10.1109/iccv.2019.00972 |
9 | BHAGAT S, CONTRACTOR D, SHARMA S, et al. Cascade classifier based helmet detection using OpenCV in image processing[C/OL]// Proceedings of the 2016 National Conference on Recent Trends in Computer and Communication Technology. [2021-02-28].. |
10 | SILVA R, AIRES K, SANTOS T, et al. Automatic detection of motorcyclists without helmet[C]// Proceedings of the XXXIX Latin American Computing Conference. Piscataway: IEEE, 2013:1-7. 10.1109/clei.2013.6670613 |
11 | YOGAMEENA B, MENAKA K, PERUMAAL S S. Deep learning-based helmet wear analysis of a motorcycle rider for intelligent surveillance system[J]. IET Intelligent Transport Systems, 2019, 13(7):1190-1198. 10.1049/iet-its.2018.5241 |
12 | VISHNU C, SINGH D, MOHAN C K, et al. Detection of motorcyclists without helmet in videos using convolutional neural network[C]// Proceedings of the 2017 International Joint Conference on Neural Networks. Piscataway: IEEE, 2017:3036-3041. 10.1109/ijcnn.2017.7966233 |
13 | SHINE L, JIJI C V. Automated detection of helmet on motorcyclists from traffic surveillance videos: a comparative analysis using hand-crafted features and CNN[J]. Multimedia Tools Applications, 2020, 79(19/20): 14179-14199. 10.1007/s11042-020-08627-w |
14 | CHAIRAT A, DAILEY M N, LIMSOONTHRAKUL S, et al. Low cost, high performance automatic motorcycle helmet violation detection[C]// Proceedings of the 2020 IEEE Winter Conference on Applications of Computer Vision. Piscataway: IEEE, 2020:3549-3557. 10.1109/wacv45572.2020.9093538 |
15 | SINGH D, VISHNU C, MOHAN C K. Real-time detection of motorcyclist without helmet using cascade of CNNs on edge-device[C]// Proceedings of the IEEE 23rd International Conference on Intelligent Transportation Systems. Piscataway: IEEE, 2020:1-8. 10.1109/itsc45102.2020.9294747 |
16 | DASGUPTA M, BANDYOPADHYAY O, CHATTERJI S. Automated helmet detection for multiple motorcycle riders using CNN[C]// Proceedings of the 2019 IEEE Conference on Information and Communication Technology. Piscataway: IEEE, 2019:1-4. 10.1109/cict48419.2019.9066191 |
17 | 赵睿,刘辉,刘沛霖,等. 基于改进YOLOv5s的安全帽检测算法[J/OL]. 北京航空航天大学学报 (2021-11-23) [2022-01-23].. 10.1109/icccas55266.2022.9825037 |
ZHAO R, LIU H, LIU P L, et al. Research on helmet detection algorithm based on improved YOLOv 5s[J/OL]. Journal of Beijing University of Aeronautics and Astronautics (2021-11-23) [2022-01-23].. 10.1109/icccas55266.2022.9825037 | |
18 | HE K M, ZHANG X Y, REN S Q, et al. Spatial pyramid pooling in deep convolutional networks for visual recognition[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015, 37(9):1904-1916. 10.1109/tpami.2015.2389824 |
19 | LIN T Y, DOLLÁR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]// Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2017: 936-944. 10.1109/cvpr.2017.106 |
20 | LIU S, QI L, QIN H F, et al. Path aggregation network for instance segmentation[C]// Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2018:8759-8768. 10.1109/cvpr.2018.00913 |
21 | WOO S, PARK J, LEE J Y, et al. CBAM: convolutional block attention module[C]// Proceedings of the 2018 European Conference on Computer Vision, LNCS 11211. Cham: Springer, 2018: 3-19. |
22 | HOU Q B, ZHOU D Q, FENG J S. Coordinate attention for efficient mobile network design[C]// Proceedings of the 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2021:13708-13717. 10.1109/cvpr46437.2021.01350 |
23 | 邹梓吟,盖绍彦,达飞鹏,等. 基于注意力机制的遮挡行人检测算法[J]. 光学学报, 2021, 41(15): No.1515001. 10.3788/aos202141.1515001 |
ZOU Z Y, GAI S Y, DA F P, et al. Occluded pedestrian detection algorithm based on attention mechanism[J]. Acta Optica Sinica, 2021, 41(15): No.1515001. 10.3788/aos202141.1515001 | |
24 | WU W K, ZHANG Y, WANG D, et al. SK-Net: deep learning on point cloud via end-to-end discovery of spatial keypoints[C]// Proceedings of the 34th AAAI Conference on Artificial Intelligence. Palo Alto, CA: AAAI Press, 2020: 6422-6429. 10.1609/aaai.v34i04.6113 |
25 | ZHANG Z H, WANG P, LIU W, et al. Distance-IoU loss: faster and better learning for bounding box regression[C]// Proceedings of the 34th AAAI Conference on Artificial Intelligence. Palo Alto, CA: AAAI Press, 2020:12993-13000. 10.1609/aaai.v34i07.6999 |
26 | LI S S, LI Y J, LI Y, et al. YOLO-FIRI: improved YOLOv5 for infrared image object detection[J]. IEEE Access, 2021, 9: 141861-141875. 10.1109/access.2021.3120870 |
27 | IOFFE S, SZEGEDY C. Batch normalization: accelerating deep network training by reducing internal covariate shift[C]// Proceedings of the 32nd International Conference on Machine Learning. New York: JMLR.org, 2015:448-456. |
28 | 樊缤,李智,高健. 基于多尺度知识学习的深度鲁棒水印算法[J]. 计算机应用, 2022, 42(10):3102-3110. 10.11772/j.issn.1001-9081.2021050737 |
FAN B, LI Z, GAO J. Deep robust watermarking algorithm based on multiscale knowledge learning[J]. Journal of Computer Applications, 2022, 42(10):3102-3110. 10.11772/j.issn.1001-9081.2021050737 | |
29 | 姚群力,胡显,雷宏. 基于多尺度融合特征卷积神经网络的遥感图像飞机目标检测[J]. 测绘学报, 2019, 48(10):1266-1274. 10.11947/j.AGCS.2019.20180398 |
YAO Q L, HU X, LEI H. Aircraft detection in remote sensing imagery with multi-scale feature fusion convolutional neural networks[J]. Acta Geodaetica et Cartographica Sinica, 2019, 48(10):1266-1274. 10.11947/j.AGCS.2019.20180398 | |
30 | 左航旭,廖彬,陈小昆,等. 融合迁移学习和数据增强的SC-Net模型在皮肤癌识别中的应用[J]. 计算机应用研究, 2022, 39(8):2550-2555, 2560. |
ZUO H X, LIAO B, CHEN X K, et al. Application of SC-Net model integrated with transfer learning and data augmentation in skin cancer recognition[J]. Application Research of Computers, 2022, 39(8):2550-2555, 2560. |
[1] | 祖佳贞, 周永霞, 陈乐. 结合注意力的双分支残差低光照图像增强[J]. 《计算机应用》唯一官方网站, 2023, 43(4): 1240-1247. |
[2] | 窦光义, 魏发南, 邱创一, 巢建树. 基于注意力自相关机制的跟踪外观特征[J]. 《计算机应用》唯一官方网站, 2023, 43(4): 1248-1254. |
[3] | 郝巨鸣, 杨景玉, 韩淑梅, 王阳萍. 引入Ghost模块和ECA的YOLOv4公路路面裂缝检测方法[J]. 《计算机应用》唯一官方网站, 2023, 43(4): 1284-1290. |
[4] | 袁泉, 徐雲鹏, 唐成亮. 基于路径标签的文档级关系抽取方法[J]. 《计算机应用》唯一官方网站, 2023, 43(4): 1029-1035. |
[5] | 孙浩, 曹健, 李海生, 毛典辉. 基于改进胶囊网络的会话型推荐模型[J]. 《计算机应用》唯一官方网站, 2023, 43(4): 1043-1049. |
[6] | 李佳东, 张丹普, 范亚琼, 杨剑锋. 基于改进YOLOv5的轻量级船舶目标检测算法[J]. 《计算机应用》唯一官方网站, 2023, 43(3): 923-929. |
[7] | 何雪东, 宣士斌, 王款, 陈梦楠. 融合累积分布函数和通道注意力机制的DeepLabV3+图像分割算法[J]. 《计算机应用》唯一官方网站, 2023, 43(3): 936-942. |
[8] | 尹聪, 胡汉平. 基于时间注意力机制的时滞混沌系统参数辨识模型[J]. 《计算机应用》唯一官方网站, 2023, 43(3): 842-847. |
[9] | 孙杰, 吴绍鑫, 王学军, 华璟. 基于Sophon SC5+芯片构架的行人搜索算法与优化[J]. 《计算机应用》唯一官方网站, 2023, 43(3): 744-751. |
[10] | 王萍, 陈楠, 鲁磊. 基于场景先验及注意力引导的跌倒检测算法[J]. 《计算机应用》唯一官方网站, 2023, 43(2): 529-535. |
[11] | 邵小萌, 张猛. 融合注意力机制的时间卷积知识追踪模型[J]. 《计算机应用》唯一官方网站, 2023, 43(2): 343-348. |
[12] | 徐铭, 李林昊, 齐巧玲, 王利琴. 基于注意力平衡列表的溯因推理模型[J]. 《计算机应用》唯一官方网站, 2023, 43(2): 349-355. |
[13] | 谌贵辉, 林瑾瑜, 李跃华, 李忠兵, 魏钰力, 卢凯. 注意力机制下的多阶段低照度图像增强网络[J]. 《计算机应用》唯一官方网站, 2023, 43(2): 552-559. |
[14] | 刘聪, 万根顺, 高建清, 付中华. 基于韵律特征辅助的端到端语音识别方法[J]. 《计算机应用》唯一官方网站, 2023, 43(2): 380-384. |
[15] | 刘辉, 马祥, 张琳玉, 何如瑾. 融合匹配长短时记忆网络和语法距离的方面级情感分析模型[J]. 《计算机应用》唯一官方网站, 2023, 43(1): 45-50. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||