《计算机应用》唯一官方网站 ›› 2022, Vol. 42 ›› Issue (8): 2378-2385.DOI: 10.11772/j.issn.1001-9081.2021061005
所属专题: 人工智能
收稿日期:
2021-06-15
修回日期:
2021-10-03
接受日期:
2021-10-18
发布日期:
2022-01-25
出版日期:
2022-08-10
通讯作者:
丁胜
作者简介:
张新宇(1996—),男,河南焦作人,硕士研究生,主要研究方向:计算机视觉、深度学习;基金资助:
Xinyu ZHANG1,2, Sheng DING1,2(), Zhipei YANG1,2
Received:
2021-06-15
Revised:
2021-10-03
Accepted:
2021-10-18
Online:
2022-01-25
Published:
2022-08-10
Contact:
Sheng DING
About author:
ZHANG Xinyu, born in 1996, M. S. candidate. His research interests include computer vision, deep learning.Supported by:
摘要:
针对交通标志在某些场景中存在分辨率过低、被覆盖等环境因素影响导致在目标检测任务中出现漏检、误检的情况,提出一种基于改进注意力机制的交通标志检测算法。首先,针对交通标志因破损、光照等环境影响造成图像分辨率低从而导致网络提取图像特征信息有限的问题,在主干网络中添加注意力模块以增强目标区域的关键特征;其次,特征图中相邻通道间的局部特征由于感受野重叠而存在一定的相关性,用大小为k的一维卷积代替通道注意力模块中的全连接层,以达到聚合不同通道信息和减少额外参数量的作用;最后,在路径聚合网络(PANet)的中、小尺度特征层引入感受野模块来增大特征图的感受野以融合目标区域的上下文信息,从而提升网络对交通标志的检测能力。在中国交通标志检测数据集(CCTSDB)上的实验结果表明,所提出的YOLOv4(You Only Look Once v4)改进算法在引进极少的参数量与原算法检测速度相差不大的情况下,平均精确率均值(mAP)达96.88%,mAP提升了1.48%;而与轻量级网络YOLOv5s相比,在单张检测速度慢10 ms的情况下,所提算法mAP比YOLOv5s高3.40个百分点,检测速度达到40?frame/s,说明该算法完全满足目标检测实时性的要求。
中图分类号:
张新宇, 丁胜, 杨治佩. 基于改进注意力机制的交通标志检测算法[J]. 计算机应用, 2022, 42(8): 2378-2385.
Xinyu ZHANG, Sheng DING, Zhipei YANG. Traffic sign detection algorithm based on improved attention mechanism[J]. Journal of Computer Applications, 2022, 42(8): 2378-2385.
特征图 | 感受野 | Anchor | ||
---|---|---|---|---|
19×19 | 大 | (24,39) | (35,73) | 72,116 |
38×38 | 中 | (16,26) | (17,47) | (22,59) |
76×76 | 小 | (10,26) | (12,23) | (14,40) |
表1 k-means++算法生成的Anchor
Tab. 1 Anchors generated by k-means++ algorithm
特征图 | 感受野 | Anchor | ||
---|---|---|---|---|
19×19 | 大 | (24,39) | (35,73) | 72,116 |
38×38 | 中 | (16,26) | (17,47) | (22,59) |
76×76 | 小 | (10,26) | (12,23) | (14,40) |
算法 | 额外参数量 | 额外计算量 | mAP/% |
---|---|---|---|
YOLOv4 | 0 | 0 | 95.47 |
YOLOv4+FcaNet | 1 136 320 | 121 831 468 | 96.19 |
YOLOv4+FcaNet-E | 5 206 | 36 506 | 96.28 |
表2 引入通道注意力模块前后YOLOv4算法对比
Tab. 2 Comparison of YOLOv4 algorithms before and after introducing channel attention module
算法 | 额外参数量 | 额外计算量 | mAP/% |
---|---|---|---|
YOLOv4 | 0 | 0 | 95.47 |
YOLOv4+FcaNet | 1 136 320 | 121 831 468 | 96.19 |
YOLOv4+FcaNet-E | 5 206 | 36 506 | 96.28 |
算法 | 额外计算量 | 单张耗时/s | mAP/% |
---|---|---|---|
CBAM | 44 648 488 | 0.041 | 96.55 |
改进后的CBAM | 29 773 | 0.025 | 93.19 |
FcaNet-E | 36 506 | 0.025 | 96.28 |
表3 FcaNet-E与CBAM注意力机制模块对比
Tab. 3 Comparison of FcaNet-E and CBAM attention mechanism modules
算法 | 额外计算量 | 单张耗时/s | mAP/% |
---|---|---|---|
CBAM | 44 648 488 | 0.041 | 96.55 |
改进后的CBAM | 29 773 | 0.025 | 93.19 |
FcaNet-E | 36 506 | 0.025 | 96.28 |
算法 | 单张耗时/s | AP/% | mAP/% | ||
---|---|---|---|---|---|
禁止 | 指示 | 警告 | |||
Faster R-CNN | 0.142 | 99.16 | 92.47 | 91.82 | 94.48 |
YOLOv3 | 0.034 | 99.02 | 92.31 | 88.28 | 93.20 |
YOLOv4 | 0.019 | 93.14 | 96.69 | 96.57 | 95.47 |
YOLOv5s | 0.015 | 93.17 | 91.48 | 95.79 | 93.48 |
本文算法 | 0.025 | 96.48 | 96.73 | 97.42 | 96.88 |
表4 CCTSDB数据集上不同算法对比结果(IoU=0.5)
Tab. 4 Comparison results of different algorithms on CCTSDB dataset(IoU=0.5)
算法 | 单张耗时/s | AP/% | mAP/% | ||
---|---|---|---|---|---|
禁止 | 指示 | 警告 | |||
Faster R-CNN | 0.142 | 99.16 | 92.47 | 91.82 | 94.48 |
YOLOv3 | 0.034 | 99.02 | 92.31 | 88.28 | 93.20 |
YOLOv4 | 0.019 | 93.14 | 96.69 | 96.57 | 95.47 |
YOLOv5s | 0.015 | 93.17 | 91.48 | 95.79 | 93.48 |
本文算法 | 0.025 | 96.48 | 96.73 | 97.42 | 96.88 |
FcaNet | FcaNet-E | SCRFB | mAP |
---|---|---|---|
√ | 96.19 | ||
√ | 96.28 | ||
√ | 96.09 | ||
√ | √ | 96.71 | |
√ | √ | 96.88 | |
95.47 |
表5 在YOLOv4网络中添加各模块后的mAP对比 ( %)
Tab. 5 mAP comparison after adding each module to YOLOv4 network
FcaNet | FcaNet-E | SCRFB | mAP |
---|---|---|---|
√ | 96.19 | ||
√ | 96.28 | ||
√ | 96.09 | ||
√ | √ | 96.71 | |
√ | √ | 96.88 | |
95.47 |
1 | 刘丹,吴亚娟,罗南超,等.嵌入注意力和特征交织模块的Gaussian-YOLO v3目标检测[J].计算机应用, 2020, 40(8): 2225-2230. 10.11772/j.issn.1001-9081.2020010030 |
LIU D, WU Y J, LUO N C, et al. Object detection of Gaussian-YOLO v3 implanting attention and feature intertwine modules[J]. Journal of Computer Applications, 2020, 40(8): 2225-2230. 10.11772/j.issn.1001-9081.2020010030 | |
2 | 喻清挺,喻维超,喻国平.基于改进R-FCN的交通标志检测[J].计算机工程, 2021, 47(12): 285-290, 298. 10.1109/citce54390.2021.00008 |
YU Q T, YU W C, YU G P. Traffic sigh detection based on improved R-FCN[J]. Computer Engineering, 2021, 47(12): 285-290, 298. 10.1109/citce54390.2021.00008 | |
3 | 周苏,支雪磊,刘懂,等.基于卷积神经网络的小目标交通标志检测算法[J].同济大学学报(自然科学版), 2019, 47(11): 1626-1632. |
ZHOU S, ZHI X L, LIU D, et al. A convolutional neural network-based method for small traffic sign detection[J]. Journal of Tongji University (Natural Science), 2019, 47(11): 1626-1632. | |
4 | 刘紫燕,袁磊,朱明成,等.融合SPP和改进FPN的YOLOv3交通标志检测[J].计算机工程与应用, 2021, 57(7): 164-170. |
LIU Z Y, YUAN L, ZHU M C, et al. YOLOv3 traffic sign detection based on SPP and improved FPN[J]. Computer Engineering and Applications, 2021, 57(7): 164-170. | |
5 | 田锋,雷印杰,邓棋.基于YOLOv3的自然路况信息识别研究[J].计算机应用研究, 2020, 37(S1): 391-393. |
TIAN F, LEI Y J, DENG Q. Research on natural road condition information recognition based on YOLOv3[J]. Application Research of Computers, 2020, 37(S1): 391-393. | |
6 | AYTAÇ KORKMAZ S, AKÇIÇEK A, BÍNOL H, et al. Recognition of the stomach cancer images with probabilistic HOG feature vector histograms by using HOG features [C]// Proceedings of the IEEE 15th International Symposium on Intelligent Systems and Informatics. Piscataway: IEEE, 2017: 339-342. 10.1109/sisy.2017.8080578 |
7 | LIAO M H, ZHU Z, SHI B G, et al. Rotation-sensitive regression for oriented scene text detection [C]// Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2018: 5909-5918. 10.1109/cvpr.2018.00619 |
8 | REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks [C]// Proceedings of the 28th International Conference on Neural Information Processing Systems. Cambridge: MIT Press, 2015: 91-99. |
9 | 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 |
10 | LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot multibox detector [C]// Proceedings of the 2016 European Conference on Computer Vision, LNCS 9905. Cham: Springer, 2016: 21-37. |
11 | 鲍敬源,薛榕刚.基于YOLOv3模型压缩的交通标志实时检测算法[J].计算机工程与应用, 2020, 56(23): 202-210. |
BAO J Y, XUE R G. Compression algorithm of traffic sign real-time detection based on YOLOv3 model[J]. Computer Engineering and Applications, 2020, 56(23): 202-210. | |
12 | 江金洪,鲍胜利,史文旭,等.基于YOLO v3算法改进的交通标志识别算法[J].计算机应用, 2020, 40(8): 2472-2478. |
JIANG J H, BAO S L, SHI W X, et al. Improved traffic sign recognition algorithm based on YOLO v3 algorithm[J]. Journal of Computer Applications, 2020, 40(8): 2472-2478. | |
13 | 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 |
14 | 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 |
15 | 卞鹏程,郑忠龙,李明禄,等.基于注意力融合网络的视频超分辨率重建[J].计算机应用, 2021, 41(4): 1012-1019. |
BIAN P C, ZHENG Z L, LI M L, et al. Attention fusion network based video super-resolution reconstruction[J]. Journal of Computer Applications, 2021, 41(4): 1012-1019. | |
16 | 刘剑峰,潘晨.增强特征金字塔结构的显著目标检测算法[J/OL].计算机工程与应用. (2021-04-19) [2021-08-21]. . 10.3778/j.issn.1002-8331.2011-0111 |
LIU J F, PAN C. Salient object detection algorithm for enhanced feature pyramid structure[J/OL]. Computer Engineering and Applications. (2021-04-19) [2021-08-21]. . 10.3778/j.issn.1002-8331.2011-0111 | |
17 | 付国栋,黄进,杨涛,等.改进CBAM的轻量级注意力模型[J].计算机工程与应用, 2021, 57(20): 150-156. |
FU G D, HUANG J, YANG T, et al. Improved lightweight attention model based on CBAM[J]. Computer Engineering and Applications, 2021, 57(20): 150-156. | |
18 | QIN Z Q, ZHANG P Y, WU F, et al. FcaNet: frequency channel attention networks [C]// Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision. Piscataway: IEEE, 2016: 763-772. |
19 | WANG Q L, WU B G, ZHU P F, et al. ECA-Net: efficient channel attention for deep convolutional neural networks [C]// Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2020: 11531-11539. 10.1109/cvpr42600.2020.01155 |
20 | 白士磊,殷柯欣,朱建启.轻量级YOLOv3的交通标志检测算法[J].计算机与现代化, 2020(9): 83-88, 94. 10.3969/j.issn.1006-2475.2020.09.015 |
BAI S L, YIN K X, ZHU J Q. Lightweight YOLOv3 traffic sign detection algorithm[J]. Computer and Modernization, 2020(9): 83-88, 94. 10.3969/j.issn.1006-2475.2020.09.015 | |
21 | 李成豪,张静,胡莉,等.基于多尺度感受野融合的小目标检测算法[J/OL].计算机工程与应用. (2021-04-20) [2021-08-21]. . 10.3778/j.issn.1002-8331.2101-0009 |
LI C H, ZHANG J, HU L, et al. Small object detection algorithm based on multi-scale receptive field fusion[J]. Computer Engineering and Applications. (2021-04-20) [2021-08-21]. . 10.3778/j.issn.1002-8331.2101-0009 | |
22 | LIU S T, HUANG D, WANG Y H. Receptive field block net for accurate and fast object detection [C]// Proceedings of the 2018 European Conference on Computer Vision, LNCS 11215. Cham: Springer, 2018: 404-419. |
23 | SZEGEDY C, LIU W, JIA Y Q, et al. Going deeper with convolutions [C]// Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2015: 1-9. 10.1109/cvpr.2015.7298594 |
[1] | 赵志强, 马培红, 黑新宏. 基于双重注意力机制的人群计数方法[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2886-2892. |
[2] | 秦璟, 秦志光, 李发礼, 彭悦恒. 基于概率稀疏自注意力神经网络的重性抑郁疾患诊断[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2970-2974. |
[3] | 李力铤, 华蓓, 贺若舟, 徐况. 基于解耦注意力机制的多变量时序预测模型[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2732-2738. |
[4] | 薛凯鹏, 徐涛, 廖春节. 融合自监督和多层交叉注意力的多模态情感分析网络[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2387-2392. |
[5] | 汪雨晴, 朱广丽, 段文杰, 李书羽, 周若彤. 基于交互注意力机制的心理咨询文本情感分类模型[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2393-2399. |
[6] | 高鹏淇, 黄鹤鸣, 樊永红. 融合坐标与多头注意力机制的交互语音情感识别[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2400-2406. |
[7] | 李钟华, 白云起, 王雪津, 黄雷雷, 林初俊, 廖诗宇. 基于图像增强的低照度人脸检测[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2588-2594. |
[8] | 莫尚斌, 王文君, 董凌, 高盛祥, 余正涛. 基于多路信息聚合协同解码的单通道语音增强[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2611-2617. |
[9] | 熊武, 曹从军, 宋雪芳, 邵云龙, 王旭升. 基于多尺度混合域注意力机制的笔迹鉴别方法[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2225-2232. |
[10] | 李欢欢, 黄添强, 丁雪梅, 罗海峰, 黄丽清. 基于多尺度时空图卷积网络的交通出行需求预测[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2065-2072. |
[11] | 毛典辉, 李学博, 刘峻岭, 张登辉, 颜文婧. 基于并行异构图和序列注意力机制的中文实体关系抽取模型[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2018-2025. |
[12] | 刘丽, 侯海金, 王安红, 张涛. 基于多尺度注意力的生成式信息隐藏算法[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2102-2109. |
[13] | 徐松, 张文博, 王一帆. 基于时空信息的轻量视频显著性目标检测网络[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2192-2199. |
[14] | 李大海, 王忠华, 王振东. 结合空间域和频域信息的双分支低光照图像增强网络[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2175-2182. |
[15] | 魏文亮, 王阳萍, 岳彪, 王安政, 张哲. 基于光照权重分配和注意力的红外与可见光图像融合深度学习模型[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2183-2191. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||