《计算机应用》唯一官方网站 ›› 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]. 《计算机应用》唯一官方网站, 2022, 42(8): 2326-2332. |
[2] | 吕振虎, 许新征, 张芳艳. 基于挤压激励的轻量化注意力机制模块[J]. 《计算机应用》唯一官方网站, 2022, 42(8): 2353-2360. |
[3] | 玄英律, 万源, 陈嘉慧. 基于多尺度卷积和注意力机制的LSTM时间序列分类[J]. 《计算机应用》唯一官方网站, 2022, 42(8): 2343-2352. |
[4] | 刘博, 卿粼波, 王正勇, 刘美, 姜雪. 基于分块注意力机制和交互位置关系的群组活动识别[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2052-2057. |
[5] | 秦庭威, 赵鹏程, 秦品乐, 曾建朝, 柴锐, 黄永琦. 基于残差注意力机制的点云配准算法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2184-2191. |
[6] | 韩泽芳, 张雄, 上官宏, 韩兴隆, 韩静, 奉刚, 崔学英. 用于低剂量CT降噪的伪影感知生成对抗网络[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2301-2310. |
[7] | 黄诚, 赵倩锐. 基于语言模型词嵌入和注意力机制的敏感信息检测方法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2009-2014. |
[8] | 李晓寒, 王俊, 贾华丁, 萧刘. 基于多重注意力机制的图神经网络股市波动预测方法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2265-2273. |
[9] | 左亚尧, 陈皓宇, 陈致然, 洪嘉伟, 陈坤. 融合多语义特征的命名实体识别方法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2001-2008. |
[10] | 刘万军, 王佳铭, 曲海成, 董利兵, 曹欣宇. 基于频谱空间域特征注意的音乐流派分类算法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2072-2077. |
[11] | 凡文俊, 赵曙光, 郭力争. 基于改进RetinaNet的船舶检测算法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2248-2255. |
[12] | 钟志峰, 夏一帆, 周冬平, 晏阳天. 基于改进YOLOv4的轻量化目标检测算法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2201-2209. |
[13] | 王海起, 王志海, 李留珂, 孔浩然, 王琼, 徐建波. 基于网格划分的城市短时交通流量时空预测模型[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2274-2280. |
[14] | 张杨, 郝江波. 基于注意力机制和残差网络的恶意代码检测方法[J]. 《计算机应用》唯一官方网站, 2022, 42(6): 1708-1715. |
[15] | 苏珊, 张杨, 张冬雯. 基于深度学习的耦合度相关代码坏味检测方法[J]. 《计算机应用》唯一官方网站, 2022, 42(6): 1702-1707. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||