APP下载

结合注意力机制的交通标志识别

2019-09-04马平杨兴财

科技风 2019年21期
关键词:交通标志智能交通神经网络

马平 杨兴财

摘 要:智能交通体系中的无人驾驶这项课题是近年来一直是各大传统汽车行业甚至各大互联网巨头企业的研究热点。目前的无人驾驶技术以及辅助驾驶技术主要依赖于计算机视觉来采集道路交通标志信号,并通过分析系统实现对交通标志的处理及分类任务。现阶段的主要研究方法有传统方式的提取图片的HOG特征、SIFT特征等,之后送入SVM分类器或者贝叶斯分类器中。实现对于交通标志的提取与分类。近年来神经网络的迅速发展也为交通标志的识别贡献了新的力量,CNN,Faster R-CNN等网络的出现也被运用在交通标志的识别中。针对智能交通体系构建过程中的道路交通标志识别率较低的问题,本文将注意力机制引入到神经网络中,实现对交通标志图片的有效识别。该方法通过VGG网络实现对输入数据的特征提取,并加入递进的注意力网络实现对关注区域的放大以及细节提取,使得网络能够更有效地关注细节区域。将网络应用在比利时交通数据集上并取得了优秀的识别结果。最终的测试集分类准确率达到了98.2%。

关键词:注意力;交通标志;智能交通;神经网络;卷积网络

中图分类号:TP391文献标识码:A

Traffic sign recognition combined with attention network

Ma Ping Yang Xingcai

Department of Automation,North China Electric Power University HebeiBaoding 071003

Abstract:The topic of unmanned driving in the intelligent transportation system has been a research hotspot in major traditional automobile industries and even major Internet giants in recent years.The current unmanned technology and assisted driving technology mainly rely on computer vision to collect road traffic sign signals,and through the analysis system to achieve the handling and classification tasks of traffic signs.At present,the main research methods are the HOG feature,SIFT feature,etc.of the extracted picture in the traditional way,and then sent to the SVM classifier or Bayesian classifier.Achieve the extraction and classification of traffic signs.In recent years,the rapid development of neural networks has also contributed to the identification of traffic signs.The emergence of networks such as CNN and Faster R-CNN has also been used in the identification of traffic signs.Aiming at the problem that the recognition rate of road traffic signs is low during the construction of intelligent transportation system,this paper introduces the attention mechanism into the neural network to realize the effective identification of traffic sign pictures.The method realizes feature extraction of input data through the VGG network,and adds a progressive attention network to realize amplification and detail extraction of the attention area,so that the network can pay more attention to the detail area.The network was applied to the Belgian traffic dataset and achieved excellent recognition results.The final test set classification accuracy rate reached 98.2%.

Key words:attention;traffic signs;intelligent transportation;neural network;convolutional network

1 背景與意义

近年来,无人驾驶不但在学术界掀起一股热潮,并且也成为各个互联网公司及传统汽车行业不断追求的目标。目前主流主要研究方向为基于机器视觉的自动驾驶与辅助驾驶技术。而交通标志是人们在日常出行过程中的重要的驾驶准则,按规则行驶才能够保证车辆的安全有序且高效的通行。实现无人驾驶或者现阶段的辅助驾驶的过程中,对于路面交通标志的准确识别都具有重要的意义。准确地识别之后,将结果传递给车辆的决策系统或者驾驶人员,能够更有效地保障车辆的安全有效的行驶。

网络权重的优化包括两部分:分类网络以及注意力网络。首先是分类损失LOSSclass,简写为Lcls。文章中采用交叉熵函数公式(5)来计算分类损失。并根据分类损失来进行对特征提取网络以及后续全连接层分类网络的参数调节与优化。

LCLS(Y(n),Y(n))=-∑kY(n)logY(n) (5)

注意力网络的权重优化主要是依靠不同层级网络输出的比重进行优化。Pt1为第一层网络的预测输出,经由softmax层输出时,我们不仅保留其最大值索引的标签,同时保留索引标签所占的百分比重即排名情况。所以将注意力网络的优化依据定义为LOSSrank,记为Lrank,其表达式为(6)。

Lrank(pnt,pn+1t)=max(0,1pnt-pn+1t) (6)

并通过公式(7)实现对注意力区域的选择与更新。

Lrankax∝Dtop⊙M(ax,ay,al)ax (7)

公式(7)代表了对横轴注意力参数ax的更新情况,同样的ay,al也是按照类似的方式实现对选中区域的迭代与更新,实现对APN网络权重参数的训练与优化。

4 分类的结果以及图像

实验时,测试环境是工作站i7处理器,主频是3.6GHz,16G 内存,GTX1080,Ubuntu 14.04操作系统。

对于改进前的RA-CNN网络来说,前两层的识别率较高,但第三层注意力网络输出时就会出现识别正确率较低的情况,推测是由于只是聚焦在某一特定位置,而忽略了对全局信息的特征化,从而使得识别结果不理想。

损失情况如下图4,5所示,我们在这里采用两个网络交替训练的形式,所以在图像中会出现平直线的情况。由图像可知损失函数是在有效下降的。相对于未优化前的网络,损失函数更够更快速的收敛。

正确率的图像见图6、7,可以由图像得出,第二三層网络的识别正确率明显高于未使用注意力网络的区域。而在改进网络之后,第三层网络的识别结果有了明显的改善,实现融合全局信息与细节信息,将识别正确率提升至高于第二层网络,最终实现98.2%的正确率,比原网络提升6%。

5 结论

本文将细粒度分类的方法引入到交通标志的分类中,使得深度神经网络能够在图片中提取到更加有用的分类信息,并通过改进的注意力机制以及注意力损失函数实现了对交通标志细节的放大,不同层级的放大区域最终输出时带有明显的准确率的差距。最终使得网络能够实现对数据集BTSD的有效分类。但由于数据集图像像素大小的限制,更深层次的注意力区域特征提取无法取得更好的效果,这一点也是今后可以改进的一个方向。

参考文献:

[1]Yao C,Wu F,Chen H J,et al.Traffic sign recognition using HOG-SVM and grid search[C].Hangzhou:International Conference on Signal Processing,2015.

[2]Gim J W,Hwang M C,Ko B C,et al.Real-time speed-limit sign detection and recognition using spatial pyramid feature and boosted random forest[C].Genoa:International Conference Image Analysis and Recognition,2015.

[3]Deng Zhijie,Wang Yong,Tao Xiaoling.Method of network traffic classification using Nave Bayes based on FPGA[C].Chongqing:13th IEEE Joint International Computer Science and Information Technology Conference,2011.

[4]Wu Yihui,Liu Yulong,Li Jianmin,et al.Traffic sign detection based on convolutional neural networks[C].Dallas:International Joint Conference on Neural Networks,2014.

[5]Girshick R,Donahue J,Darrell T,et al.Rich feature hierarchies for accurate object detection and semantic segmentation[C].Columbus:IEEE Conference on Computer Vision and Pattern Recognition,2013.

[6]Girshick R.Fast R-CNN[C].Santiago:IEEE International Conference on Computer Vision (ICCV),2015.

[7]袁小平,王岗,王晔枫,汪喆远,孙辉.基于改进卷积神经网络的交通标志识别方法[J/OL].电子科技,2019(11):1-5[2019-04-07].http://kns.cnki.net/kcms/detail/61.1291.TN.20181229.1448.024.html.

[8]Zhu Zhe,Liang Dun,Zhang Songhai,et al.Traffic-sign detection and classification in the wild[C].Las Vegas:IEEE Conference on Computer Vision and Pattern Recognition,2016.

[9]王子恒.路面交通标志检测调研:数据集及算法[A].中国汽车工程学会(China Society of Automotive Engineers).2018中国汽车工程学会年会论文集[C].中国汽车工程学会(China Society of Automotive Engineers):中国汽车工程学会,2018:7.

[10]Wei X S,Luo J H,Wu J,et al.Selective Convolutional Descriptor Aggregation for Fine-Grained Image Retrieval[J].IEEE Transactions on Image Processing,2017,26(6):2868-2881.

[11]Fu J,Zheng H,Tao M.Look Closer to See Better:Recurrent Attention Convolutional Neural Network for Fine-Grained Image Recognition[C]// Computer Vision & Pattern Recognition.2017.

[12]K.Simonyan and A.Zisserman.Very deep convolutional networks for large-scale image recognition.In ICLR,pages 1409-1556,2015.

猜你喜欢

交通标志智能交通神经网络
基于人工智能LSTM循环神经网络的学习成绩预测
基于图像处理与卷积神经网络的零件识别
交通安全伴我行
基于自适应神经网络的电网稳定性预测
三次样条和二次删除相辅助的WASD神经网络与日本人口预测
基于物联网的智能交通系统架构
基于支持向量机的车牌字符识别方法
智能交通中的车辆检测专利技术综述
交通标志小课堂
我们欢迎你!