Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2023, Vol. 57 Issue (4): 712-718    DOI: 10.3785/j.issn.1008-973X.2023.04.008
    
Vehicle re-identification algorithm based on attention mechanism and adaptive weight
Yu-ting SU(),Rong-xuan LU,Wei ZHANG*()
School of Electrical and Information Engineering, Tianjin University, Tianjin 300072, China
Download: HTML     PDF(1937KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

A vehicle re-identification algorithm based on attention mechanism and adaptive loss weights was proposed in order to solve the problem that the vehicle re-identification algorithms cannot adequately represent vehicle features due to intra-class differences and inter-class similarities. The improved backbone network ResNet50_ibn was used to avoid the influence of objective factors such as color, illumination and perspective, and extract invariant features about the target. An attention mechanism was introduced to build a group representation network, which fused the interdependence between features by extracting from different groups and extracted abundant feature information from different feature representations. The loss function was improved by adaptive loss weight, and the network was trained by using a multi-loss function strategy. The algorithm achieved 96.0% Rank-1, 79.8% mAP and 81.5% Rank-1, 80.9% mAP, respectively on the public datasets VeRi776 and VehicleID. The experimental results show that the features extracted by the algorithm are more discriminative. The comprehensive performance is better than other existing vehicle re-identification algorithms.



Key wordsvehicle re-identification      attention mechanism      adaptive loss weight      machine vision      deep learning     
Received: 23 April 2022      Published: 21 April 2023
CLC:  TP 391  
Fund:  国家自然科学基金资助项目(61802277)
Corresponding Authors: Wei ZHANG     E-mail: ytsu@tju.edu.cn;tjuzhangwei@tju.edu.cn
Cite this article:

Yu-ting SU,Rong-xuan LU,Wei ZHANG. Vehicle re-identification algorithm based on attention mechanism and adaptive weight. Journal of ZheJiang University (Engineering Science), 2023, 57(4): 712-718.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2023.04.008     OR     https://www.zjujournals.com/eng/Y2023/V57/I4/712


基于注意力和自适应权重的车辆重识别算法

为了解决车辆重识别算法受类内差异性与类间相似性的干扰无法充分表示车辆特征的问题,提出基于注意力机制和自适应损失权重的车辆重识别算法. 该算法采用改进的主干网络ResNet50_ibn,避免了颜色、光照、视角等客观因素的干扰,提取关于目标的不变性特征. 搭建基于注意力机制的组表示网络,融合特征间的相互依赖关系,从不同分组的特征表示中提取更加丰富的特征信息. 设计自适应损失权重计算损失函数,使用多损失函数策略对网络模型进行训练. 该算法在公开数据集VeRi776与VehicleID上的首位击中率和平均精度均值分别达到了96.0%、79.8%和81.5%、80.9%. 实验结果表明,利用该算法提取的特征更具判别性,综合性能优于现有的其他车辆重识别算法.


关键词: 车辆重识别,  注意力机制,  自适应损失权重,  机器视觉,  深度学习 
Fig.1 Vehicle re-identification network structure based on attention mechanism and adaptive weight
Fig.2 Improved residual block structure
Fig.3 Structure diagram of similarity calculation module
%
方法 Rank-1 Rank-5 mAP
ResNet50 84.2 88.1 65.6
ResNet50+GroupNet 85.9 89.6 67.8
ResNet50_ibn 88.7 92.1 71.2
ResNet50_ibn+GroupNet 90.4 94.6 72.9
Tab.1 Effectiveness of various designs
%
损失函数 Rank-1 Rank-5 mAP
CE+Triplet 90.4 94.6 72.9
CE+SupCon 91.8 96.0 74.4
Label smoothing CE+Triplet 91.2 95.3 73.8
Label smoothing CE+SupCon 92.5 96.6 75.2
Tab.2 Experimental results of different loss function
%
损失权重 Rank-1 Rank-5 mAP
1∶1 92.5 96.6 75.2
1∶2 93.8 97.2 76.7
0.5∶0.5 94.5 97.7 77.8
自适应损失权重 96.0 98.6 79.8
Tab.3 Experimental results of different loss weight
%
方法 Rank-1 Rank-5 mAP
OIFE+ST[19] 92.4 51.4
VAMI+STR[20] 85.9 91.8 61.3
PNVR[21] 94.3 98.3 74.3
MRL[22] 94.3 97.3 78.5
UMTS[6] 95.8 75.9
SPAN[9] 93.9 97.6 68.6
PVEN[23] 95.6 98.4 79.5
TBE[24] 96.0 98.5 79.5
本文方法 96.0 98.6 79.8
Tab.4 Comparison of results with mainstream algorithms in VeRi776 datasets
%
方法 小尺度 中尺度 大尺度
Rank-1 mAP Rank-1 mAP Rank-1 mAP
OIFE[19] 67.0
VAMI[20] 63.1 52.9 47.3
PNVR[21] 78.4 75.0 74.2
MRL[22] 75.7 78.3 71.6 75.4 66.5 68.2
UMTS[6] 74.4 80.4 72.4 77.1 69.8 75.2
PVEN[23] 78.4 78.3 75.0 78.3 74.2 78.3
TBE[24] 86.0 82.3 80.7
本文方法 84.5 85.3 82.5 82.6 81.5 80.9
Tab.5 Comparison of results with mainstream algorithms in VehicleID datasets
Fig.4 Comparison of re-identification detection results
[1]   LIU X, WU L, MA H, et al. Large-scale vehicle re-identification in urban surveillance videos [C]// Proceedings of the IEEE International Conference on Multimedia and Expo. Seattle: IEEE, 2016: 1-6.
[2]   ZAPLETAL D, HEROUT A. Vehicle re-identification for automatic video traffic surveillance [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops. California: IEEE, 2016: 1568-1574.
[3]   CORMIER M, SOMMER L W, TEUTSCH M. Low resolution vehicle re-identification based on appearance features for wide area motion imagery [C]// Proceedings of the IEEE Winter Applications of Computer Vision Workshops. New York: IEEE, 2016: 1-7.
[4]   LUO H, GU Y, LIAO X, et al. Bag of tricks and a strong baseline for deep person re-identification [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops. Long Beach: IEEE, 2019: 1487-1495.
[5]   ZHENG Z, RUAN T, WEI Y, et al. VehicleNet: learning robust visual representation for vehicle re-identification [C]// Proceedings of the IEEE Transactions on Multimedia. New York: IEEE, 2021: 2683-2693.
[6]   JIN X, LAN C, ZENG W, et al. Uncertainty-aware multi-shot knowledge distillation for image-based object re-identification [C]// Proceedings of the AAAI Conference on Artificial Intelligence. New York: AAAI, 2020: 11165-11172.
[7]   KIM Y, PARK W, ROH M C, et al. GroupFace: learning latent groups and constructing group-based representations for face recognition [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2020: 5620-5629.
[8]   谢秀珍, 罗志明, 连盛, 等 一种融合表观与属性信息的车辆重识别方法[J]. 厦门大学学报: 自然科学版, 2021, 60 (1): 72- 79
XIE Xiu-zhen, LUO Zhi-ming, LIAN Sheng, et al A vehicle re-identification method by fusing the vehicle appearance and attribute information[J]. Journal of Xiamen University: Natural Science Edition, 2021, 60 (1): 72- 79
[9]   CHEN T S, LIU C T, WU C W. et al. Orientation-aware vehicle re-identification with semantics-guided part attention network [C]// European Conference on Computer Vision. Amsterdam: Elsevier, 2020: 330–346.
[10]   刘晗煜, 黄宏恩, 郑世宝 基于视角一致性三元组损失的车辆重识别技术[J]. 测控技术, 2021, 40 (8): 47- 53
LIU Han-yu, HUANG Hong-en, ZHENG Shi-bao View consistency triplet loss for vehicle re-identification[J]. Measurement and Control Technology, 2021, 40 (8): 47- 53
doi: 10.19708/j.ckjs.2021.08.009
[11]   NGUYEN B X, NGUYEN B D, DO T, et al. Graph-based person signature for person re-identifications [C]// Proceedings of the 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. New York: IEEE, 2021: 3487-3496.
[12]   HUYNH S V, NGUYEN N H, NGUYEN N T, et al. A strong baseline for vehicle re-identification [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops. New York: IEEE, 2021: 4142-4149.
[13]   HE K, ZHANG X, REN S, et al. Deep residual learning for image recognition [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 770-778.
[14]   WU Y, HE K Group normalization[J]. International Journal of Computer Vision, 2018, 128: 742- 755
[15]   PRANNAY K, PIOTR T, CHEN W, et al. Supervised contrastive learning [EB/OL]. [2022-04-20]. https://arxiv.org/abs/2004.11362.
[16]   LIU X, LIU W, MEI T, et al PROVID: progressive and multimodal vehicle reidentification for large-scale urban surveillance[J]. IEEE Transactions on Multimedia, 2019, 20 (3): 645- 658
[17]   LIU H, TIAN Y, WANG Y, et al. Deep relative distance learning: tell the difference between similar vehicles [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 2167-2175.
[18]   KINGMA D, BA J. Adam: a method for stochastic optimization [C]// International Conference on Learning Representations. San Diego: [s. n.], 2015: 1412-1426.
[19]   WANG Z, TANG L, LIU X, et al. Orientation invariant feature embedding and spatial temporal regularization for vehicle reidentification [C]// Proceedings of the IEEE International Conference on Computer Vision. Venice: IEEE, 2017: 832-837.
[20]   YI Z, LING S. Viewpoint-aware attentive multi-view inference for vehicle re-identification [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2017: 6489-6498.
[21]   HE B, LI J, ZHAO Y, et al. Part-regularized near-duplicate vehicle re-identification [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Long Beach: IEEE, 2019: 3992-4000.
[22]   LIN W, Y LI, YANG X, et al. Multi-view learning for vehicle re-identification [C]// IEEE International Conference on Multimedia and Expo. Shanghai: IEEE, 2019: 832-837.
[23]   MENG D, LI L, LIU X, et al. Parsing-based view-aware embedding network for vehicle re-identification [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2020: 7101-7110.
[1] Yan-fen CHENG,Jia-jun WU,Fan HE. Aspect level sentiment analysis based on relation gated graph convolutional network[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(3): 437-445.
[2] Yao ZENG,Fa-qin GAO. Surface defect detection algorithm of electronic components based on improved YOLOv5[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(3): 455-465.
[3] Huan LAN,Jian-bo YU. Steel surface defect detection based on deep learning 3D reconstruction[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(3): 466-476.
[4] Ju-xiang ZENG,Ping-hui WANG,Yi-dong DING,Lin LAN,Lin-xi CAI,Xiao-hong GUAN. Graph neural network based node embedding enhancement model for node classification[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(2): 219-225.
[5] Fan YANG,Bo NING,Huai-qing LI,Xin ZHOU,Guan-yu LI. Multimodal image retrieval model based on semantic-enhanced feature fusion[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(2): 252-258.
[6] Chao LIU,Bing KONG,Guo-wang DU,Li-hua ZHOU,Hong-mei CHEN,Chong-ming BAO. Deep clustering via high-order mutual information maximization and pseudo-label guidance[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(2): 299-309.
[7] Jian-sha LU,Qin BAO,Hong-tao TANG,Yi-ping SHAO,Wen-bin ZHAO. Optimal tag selection method for device-free human tracking system[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(2): 415-425.
[8] Jun-chi MA,Xiao-xin DI,Zong-tao DUAN,Lei TANG. Survey on program representation learning[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(1): 155-169.
[9] Chen YE,Hong-fei ZHAN,Ying-jun LIN,Jun-he YU,Rui WANG,Wu-chang ZHONG. Design knowledge recommendation based on inference-context-aware activation model[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(1): 32-46.
[10] Lin-tao WANG,Qi MAO. Position measurement method for tunnel segment grabbing based on RGB and depth information fusion[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(1): 47-54.
[11] Li-zhou FENG,Yang YANG,You-wei WANG,Gui-jun YANG. New method for news recommendation based on Transformer and knowledge graph[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(1): 133-143.
[12] Jin-zhen LIU,Fei CHEN,Hui XIONG. Open electrical impedance imaging algorithm based on multi-scale residual network model[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(9): 1789-1795.
[13] Wan-liang WANG,Tie-jun WANG,Jia-cheng CHEN,Wen-bo YOU. Medical image segmentation method combining multi-scale and multi-head attention[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(9): 1796-1805.
[14] Kun HAO,Kuo WANG,Bei-bei WANG. Lightweight underwater biological detection algorithm based on improved Mobilenet-YOLOv3[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(8): 1622-1632.
[15] Shi-lin ZHANG,Hong-nan GUO,Xuan LIU. Person and vehicle re-identification based on energy model[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(7): 1416-1424.