Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2022, Vol. 56 Issue (4): 775-782    DOI: 10.3785/j.issn.1008-973X.2022.04.017
    
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
Download: HTML     PDF(1118KB) HTML
Export: BibTeX | EndNote (RIS)      

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 wordsvehicle type identification      high efficiency network      residual attention mechanism      label smoothing regularization      depth separable convolution     
Received: 10 May 2021      Published: 24 April 2022
CLC:  TP 391  
Fund:  国家自然科学基金资助项目(51779050); 黑龙江省自然科学基金资助项目(F2016022)
Cite this article:

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.

URL:

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


融合注意力机制的高效率网络车型识别

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


关键词: 车型识别,  高效率网络,  残差注意力机制,  标签平滑正则化,  深度可分离卷积 
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
Tab.1 EfficientNets scaling parameters
Fig.1 MBConv convolution block structure
阶段 参数 通道数 分辨率
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
Tab.2 EfficientNet-B0 network parameter structure
Fig.2 Channel attention module
Fig.3 Spatial attention module
Fig.4 Dual channel residual attention module
类别 数量 y
公共汽车(Bus) 558 0
微型客车(Microbus) 883 1
小货车(Minivan) 475 2
小轿车(Sedan) 5921 3
越野车(SUV) 1392 4
卡车(Truck) 822 5
Tab.3 BIT-Vehicles data set distribution
Fig.5 Image example of 6 vehicle types
真实结果 预测结果
正例 反例
正例 TP FN
反例 FP TN
Tab.4 Binary confusion matrix
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
Tab.5 Training results of 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
Tab.6 Accuracy of vehicle classification under different models
Fig.6 Loss convergence curve of model before and after improvement
模型 T/ms
EfficientNet-B0 8.9825
B0+LSR 10.9409
B0+softmax 12.3933
B0+残差CBAM 12.1856
本文方法 11.9415
Tab.7 Recognition time of single picture
真实标签 预测值
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
Tab.8 Confusion matrix of 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
Tab.9 Confusion matrix of improved model
Fig.7 Classification accuracy under different algorithms
Fig.8 Average accuracy of different algorithms
[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] Lan WU,Han WANG,Bin-quan LI,Chong-yang LI,Fan-shi KONG. Multi-source unsupervised domain adaption method based on self-supervised task[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(4): 754-763.
[2] Meng XU,Dan WANG,Zhi-yuan LI,Yuan-fang CHEN. IncepA-EEGNet: P300 signal detection method based on fusion of Inception network and attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(4): 745-753, 782.
[3] Xue-qin ZHANG,Tian-ren LI. Breast cancer pathological image classification based on Cycle-GAN and improved DPN network[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(4): 727-735.
[4] Yong-chao WANG,Yu CAO,Yu-hui YANG,Duan-qing XU. Dialogue generation model based on knowledge transfer and two-direction asynchronous sequence[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 520-530.
[5] Ruo-ran CHENG,Xiao-li ZHAO,Hao-jun ZHOU,Han-chen YE. Review of Chinese font style transfer research based on deep learning[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 510-519, 530.
[6] Huang-he ZHENG,Zhi-qiu HUANG,Wei-wei LI,Yao-shen YU,Yong-chao WANG. API recommendation method based on natural nearest neighbors and collaborative filtering[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 494-502.
[7] Lin-li LI,Fu GU,Hao LI,Xin-jian GU,Guo-fu LUO,Zhi-qiang WU,Yi-jin GANG. Framework and key technologies of digital twin system cyber security under perspective of bionics[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 419-435.
[8] Lin TONG,Zheng GUAN,Li-wei WANG,Wen-tao YANG,Yang YAO. New energy ramp event prediction based on time series decomposition and error correction[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 338-346.
[9] Ting WANG,Xiao-fei ZHU,Gu TANG. Knowledge-enhanced graph convolutional neural networks for text classification[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 322-328.
[10] Fei HE,Cang-hong JIN,Ming-hui WU. Uncertain behavior sequence prediction method based on intent identification[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 254-262.
[11] Ying-li LIU,Rui-gang WU,Chang-hui YAO,Tao SHEN. Construction method of extraction dataset of Al-Si alloy entity relationship[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 245-253.
[12] Yuan-jun NONG,Jun-jie WANG,Hong CHEN,Wen-han SUN,Hui GENG,Shu-yue LI. A image caption method of construction scene based on attention mechanism and encoding-decoding architecture[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 236-244.
[13] Hang-yao TU,Wan-liang WANG,Jia-chen CHEN,Guo-qing LI,Fei WU. Dehazing algorithm combined with atmospheric scattering model based on generative adversarial network[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 225-235.
[14] Pei-zhi WEN,Jun-mou CHEN,Yan-nan XIAO,Ya-yuan WEN,Wen-ming HUANG. Underwater image enhancement algorithm based on GAN and multi-level wavelet CNN[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 213-224.
[15] Hong-zhao DONG,Hao-jie FANG,Nan ZHANG. Multi-scale object detection algorithm for recycled objects based on rotating block positioning[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(1): 16-25.