Please wait a minute...
浙江大学学报(工学版)  2022, Vol. 56 Issue (4): 775-782    DOI: 10.3785/j.issn.1008-973X.2022.04.017
计算机技术、信息工程     
融合注意力机制的高效率网络车型识别
柳长源1(),何先平1,毕晓君2
1. 哈尔滨理工大学 测控技术与通信工程学院,黑龙江 哈尔滨 150080
2. 中央民族大学 信息工程学院,北京 100081
Efficient network vehicle recognition combined with attention mechanism
Chang-yuan LIU1(),Xian-ping HE1,Xiao-jun BI2
1. College of Measurement and Control Technology and Communication Engineering, Harbin University of Science and Technology, Harbin 150080, China
2. School of Information Engineering, Minzu University of China, Beijing 100081, China
 全文: PDF(1118 KB)   HTML
摘要:

为了解决现有的车型识别算法对车型特征描述不充分的情况,提出融合注意力机制的高效率网络车型识别算法. 利用高效率网络中的复合缩放方式来平衡网络的深度、宽度和分辨率,将深度可分离卷积集成到基础特征提取模块中来提高模型准确率. 增加双通道的残差注意力机制来关注图片中的关键信息,获得含有更加丰富语义信息的特征图. 在网络的末端添加单独的softmax分类器,使用标签平滑正则化对损失函数进行处理,减小模型过拟合的问题. 在BIT-Vehicles数据集上进行实验,结果表明,提出方法的平均分类准确率为96.83%,较改进前的模型提高了1.11%,优于现有DCNN、Faster-CNN的改进算法,较Faster R-CNN提升了7.16%.

关键词: 车型识别高效率网络残差注意力机制标签平滑正则化深度可分离卷积    
Abstract:

An efficient network vehicle recognition algorithm combined with attention mechanism was proposed in order to solve the problem that the existing vehicle type recognition algorithm does not adequately describe the vehicle type characteristics. The depth, width and resolution of the network were balanced by the compound scaling method in the efficient network, and the depth separable convolution was integrated into the basic feature extraction module in order to improve the accuracy of the model. The residual attention mechanism of two channels was added to pay attention to the key information in the picture, and the feature map with richer semantic information was obtained. A separate softmax classifier was added at the end of the network, and the label smoothing regularization was used to deal with the loss function in order to reduce the problem of model over-fitting. Experiments on BIT-Vehicles data set showed that the average classification precision of the proposed method was 96.83%, which was 1.11% higher than that of the original model, and was better than the existing improved algorithms of DCNN and Faster-CNN and 7.16% higher than Faster R-CNN.

Key words: vehicle type identification    high efficiency network    residual attention mechanism    label smoothing regularization    depth separable convolution
收稿日期: 2021-05-10 出版日期: 2022-04-24
CLC:  TP 391  
基金资助: 国家自然科学基金资助项目(51779050); 黑龙江省自然科学基金资助项目(F2016022)
作者简介: 柳长源(1970—),男,副教授,从事模式识别与机器学习的研究. orcid.org/0000-0003-2204-0612. E-mail: liuchangyuan@hrbust.edu.cn
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
柳长源
何先平
毕晓君

引用本文:

柳长源,何先平,毕晓君. 融合注意力机制的高效率网络车型识别[J]. 浙江大学学报(工学版), 2022, 56(4): 775-782.

Chang-yuan LIU,Xian-ping HE,Xiao-jun BI. Efficient network vehicle recognition combined with attention mechanism. Journal of ZheJiang University (Engineering Science), 2022, 56(4): 775-782.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2022.04.017        https://www.zjujournals.com/eng/CN/Y2022/V56/I4/775

EfficientNet w d r dr
B0 1.0 1.0 224 0.2
B1 1.0 1.1 240 0.2
B2 1.1 1.2 260 0.3
B3 1.2 1.4 300 0.3
B4 1.4 1.8 380 0.4
B5 1.6 2.2 456 0.4
B6 1.8 2.6 528 0.5
B7 2.0 3.1 600 0.5
表 1  EfficientNet缩放参数
图 1  MBConv卷积块结构
阶段 参数 通道数 分辨率
1 Conv3×3 32×1 224×224
2 MBConv1, 3×3 16×1 112×112
3 MBConv6, 3×3 24×2 112×112
4 MBConv6, 5×5 40×2 56×56
5 MBConv6, 3×3 80×3 28×28
6 MBConv6, 5×5 112×3 14×14
7 MBConv6, 5×5 192×4 14×14
8 MBConv6, 3×3 320×1 7×7
9 Conv1×1×1, Pooling 1280×1 7×7
10 FC, softmax 1280×1 7×7
表 2  EfficientNet-B0网络参数结构
图 2  通道注意力模块
图 3  空间注意力模块
图 4  双通道残差注意力模块
类别 数量 y
公共汽车(Bus) 558 0
微型客车(Microbus) 883 1
小货车(Minivan) 475 2
小轿车(Sedan) 5921 3
越野车(SUV) 1392 4
卡车(Truck) 822 5
表 3  BIT-Vehicles数据集分布
图 5  6类车型的图像示例
真实结果 预测结果
正例 反例
正例 TP FN
反例 FP TN
表 4  二分类混淆矩阵
EfficientNet Acc /% P/106
B0 93.17 15.59
B1 91.17 25.26
B2 92.83 29.81
B3 90.17 41.33
B4 93.00 67.65
B5 92.50 109.05
B6 91.00 156.56
B7 93.00 224.88
表 5  EfficientNet-B0~B7的训练结果
类别 Acc /%
Efficient
Net-B0
B0+LSR B0+softmax B0+残差
CBAM
本文方法
Bus 99.90 99.90 99.90 99.99 99.99
Microbus 95.60 96.20 97.00 96.60 98.20
Minivan 99.80 99.80 99.80 99.99 99.99
Sedan 98.60 98.60 98.00 97.80 98.40
SUV 84.80 82.80 84.60 85.60 86.60
Truck 95.40 97.00 96.00 96.00 97.80
表 6  不同模型下的车型分类准确率
图 6  改进前、后的模型损失收敛曲线
模型 T/ms
EfficientNet-B0 8.9825
B0+LSR 10.9409
B0+softmax 12.3933
B0+残差CBAM 12.1856
本文方法 11.9415
表 7  单张图片的识别时间
真实标签 预测值
y = 0 y = 1 y = 2 y = 3 y = 4 y = 5
0 100 0 0 0 0 0
1 0 96 0 2 2 0
2 0 0 100 0 0 0
3 0 0 0 98 2 0
4 0 6 0 9 85 0
5 0 0 5 0 0 95
表 8  EfficientNet-B0的混淆矩阵
真实标签 预测值
y = 0 y = 1 y = 2 y = 3 y = 4 y = 5
0 100 0 0 0 0 0
1 0 98 0 1 1 0
2 0 0 100 0 0 0
3 0 0 0 98 2 0
4 0 4 0 9 87 0
5 0 0 2 0 0 98
表 9  改进后模型的混淆矩阵
图 7  不同算法下的分类准确率
图 8  不同算法下的平均准确率
1 李琳辉, 钱波, 连静 基于卷积神经网络的交通场景语义分割方法研究[J]. 通信学报, 2018, 39 (4): 123- 130
LI Lin-hui, QIAN Bo, LIAN Jing Research on semantic segmentation method of traffic scene based on convolutional neural network[J]. Journal of Communications, 2018, 39 (4): 123- 130
doi: 10.11959/j.issn.1000-436x.2018053
2 JIANG C, ZHANG B. Weakly-supervised vehicle detection and classification by convolutional neural network [C]// 2016 9th International Congress on Image and Signal Processing, BioMedical Engineering and Informatics. Datong: IEEE, 2016: 570-575.
3 KRIZHEYSKY A, SUTSKEVER I, HINTON G E ImageNet classification with deep convolutional neural networks[J]. Communications of the ACM, 2017, 60 (6): 84- 90
doi: 10.1145/3065386
4 DONG Z, WU Y, PEI M, et al Vehicle type classification using a semisupervised convolutional neural network[J]. IEEE Transactions on Intelligent Transportation Systems, 2015, 16 (4): 2247- 2256
doi: 10.1109/TITS.2015.2402438
5 袁公萍, 汤一平, 韩旺明 基于深度卷积神经网络的车型识别方法[J]. 浙江大学学报:工学版, 2018, 52 (4): 694- 702
YUAN Gong-ping, TANG Yi-ping, HAN Wang-ming Vehicle recognition method based on deep convolution neural network[J]. Journal of Zhejiang University: Engineering Science, 2018, 52 (4): 694- 702
6 范丽丽, 赵宏伟, 赵浩宇 基于深度卷积神经网络的目标检测研究综述[J]. 光学精密工程, 2020, 28 (5): 1152- 1164
FAN Li-li, ZHAO Hong-wei, ZHAO Hao-yu A review of target detection based on deep convolution neural network[J]. Optical Precision Engineering, 2020, 28 (5): 1152- 1164
7 杨州, 慕晓冬, 王舒洋 基于多尺度特征融合的遥感图像场景分类[J]. 光学精密工程, 2018, 26 (12): 3099- 3107
YANG Zhou, MU Xiao-dong, WANG Shu-yang Remote sensing image scene classification based on multi-scale feature fusion[J]. Optical Precision Engineering, 2018, 26 (12): 3099- 3107
doi: 10.3788/OPE.20182612.3099
8 李大湘, 王小雨 基于DCNN特征与集成学习的车型分类算法[J]. 计算机工程与设计, 2020, 41 (6): 1624- 1628
LI Da-xiang, WANG Xiao-yu Vehicle classification algorithm based on DCNN feature and ensemble learning[J]. Computer Engineering and Design, 2020, 41 (6): 1624- 1628
9 TAN M, LE Q EfficientNet: rethinking model scaling for convolutional neural networks[J]. IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences, 2019, (5): 6105- 6114
10 孙旭豪, 傅中添, 严玲 EfficientNet在阴虚证眼象识别中的应用研究[J]. 中医药信息, 2020, 37 (3): 29- 34
SUN Xu-hao, FU Zhong-tian, YAN Ling Application of EfficientNet in eye image recognition of yin deficiency syndrome[J]. Chinese Medicine Information, 2020, 37 (3): 29- 34
11 张典, 汪海涛, 姜瑛, 等 基于轻量级网络的实时人脸识别算法研究[J]. 计算机科学与探索, 2020, 14 (2): 317- 324
ZHANG Dian, WANG Hai-tao, JIANG Ying, et al Research on real-time face recognition algorithm based on lightweight network[J]. Computer Science and Exploration, 2020, 14 (2): 317- 324
doi: 10.3778/j.issn.1673-9418.1907037
12 BARRET Z, QUOC V L Neural architecture search with reinforcement learning[J]. Pointwise Convolutional Neural Networks, 2016, (2): 1- 15
13 HARJOSEPUTRO Y, YUDA I P, DANUKUSUMO K P. MobileNets: efficient convolutional neural network for identification of protected birds [J]. International Journal on Advanced Science Engineering and Information Technology, 2020, 10(6): 2290-2296.
14 BING S H, MING K T, YEUNG S K Pointwise convolutional neural networks [C]// 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 984–993.
15 SANDLER M, HOWARD A, ZHU M, et al. Mobilenetv2: inverted residuals and linear bottlenecks [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 4510-4520.
16 HU J, SHEN L, SUN G. Squeeze-and-excitation networks [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 7132-7141.
17 李振宇, 邓向阳, 张立民 基于Swish激活函数的双通道CNN结构[J]. 计算机与数字工程, 2020, 48 (6): 1413- 1416
LI Zhen-yu, DENG Xiang-yang, ZHANG Li-min Dual channel CNN architecture based on Swish activation function[J]. Computer and Digital Engineering, 2020, 48 (6): 1413- 1416
doi: 10.3969/j.issn.1672-9722.2020.06.028
18 吴俊杰, 刘冠男, 王静远 数据智能: 趋势与挑战[J]. 系统工程理论与实践, 2020, 40 (8): 2116- 2149
WU Jun-jie, LIU Guan-nan, WANG Jing-yuan Data intelligence: trends and challenges[J]. Systems Engineering: Theory and Practice, 2020, 40 (8): 2116- 2149
doi: 10.12011/1000-6788-2020-0027-34
19 吴晨. 基于差分的生成式对抗网络GP算法及其应用研究[D]. 南京: 南京邮电大学, 2019.
WU Chen. Research on GP algorithm and its application based on differential generation countermeasure network [D]. Nanjing: Nanjing University of Posts and Telecommunications, 2019.
20 HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition [C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 770-778.
21 周非, 李阳, 范馨月 图像分类卷积神经网络的反馈损失计算方法改进[J]. 小型微型计算机系统, 2019, 40 (7): 1532- 1537
ZHOU Fei, LI Yang, FAN Xin-yue Improvement of feedback loss calculation method of image classification convolution neural network[J]. Miniature Microcomputer System, 2019, 40 (7): 1532- 1537
doi: 10.3969/j.issn.1000-1220.2019.07.032
22 梁杰, 陈嘉豪, 张雪芹 基于独热编码和卷积神经网络的异常检测[J]. 清华大学学报: 自然科学版, 2019, 59 (7): 523- 529
LIANG Jie, CHEN Jia-hao, ZHANG Xue-qin Anomaly detection based on independent heat coding and convolutional neural network[J]. Journal of Tsinghua University: Natural Science Edition, 2019, 59 (7): 523- 529
23 倪旭 基于标签平滑正则化的行人重识别研究[J]. 电脑知识与技术, 2019, 15 (8): 150- 152
NI Xu Research on pedestrian recognition based on label smoothing and regularization[J]. Computer Knowledge and Technology, 2019, 15 (8): 150- 152
[1] 袁公萍, 汤一平, 韩旺明, 陈麒. 基于深度卷积神经网络的车型识别方法[J]. 浙江大学学报(工学版), 2018, 52(4): 694-702.