Journal of Jilin University(Engineering and Technology Edition) ›› 2025, Vol. 55 ›› Issue (1): 185-197.doi: 10.13229/j.cnki.jdxbgxb.20230321

Previous Articles    

Vehicle target detection and ranging in vehicle image based on deep learning

Hui-zhi XU(),Shi-sen JIANG,Xiu-qing WANG,Shuang CHEN   

  1. School of Civil Engineering and Transportation,Northeast Forestry University,Harbin 150040,China
  • Received:2023-04-07 Online:2025-01-01 Published:2025-03-28

Abstract:

In order to improve the vehicle target detection accuracy and ranging stability in the driving environment, a deep learning-based vehicle target detection and ranging method is proposed. The YOLOX-S algorithm is used as the vehicle target detection framework for improvement: on the basis of the original algorithm, the CBAM attention module is introduced to enhance the network feature expression ability, and the confidence loss function is replaced with Focal Loss, which reduces the training weight of simple samples and improves the positive sample attention. The vehicle ranging model is established according to the imaging principle and geometric relationship of the vehicle camera, and the ranging results are obtained by inputting the coordinates of the ranging feature points and the internal reference of the camera. The improved YOLOX-S algorithm is trained and evaluated using the home-made Tlab dataset and BDD 100K dataset, and the static ranging experimental scenario is constructed to validate the vehicle ranging model. The experimental results show that the improved YOLOX-S algorithm has a detection speed of 70.14 frames/s on the experimental dataset, and the precision, recall, F1 value, and mAP are improved by 0.86%, 1.32%, 1.09%, and 1.54% respectively compared with the original algorithm; the average ranging error stays within 3.20% in the longitudinal 50m and lateral 11.25 m measurement range. It can be seen that the method in this paper has good vehicle ranging accuracy and stability while meeting the real-time requirements of vehicle detection.

Key words: transportation planning and management, deep learning, environment awareness, in-vehicle imagery, target detection, monocular ranging

CLC Number: 

  • U495

Fig.1

Vehicle object detection process in vehicle image"

Fig.2

Structure of YOLOX-S network"

Fig.3

Focus structure"

Fig.4

CBAM structure"

Fig.5

CAM structure"

Fig.6

SAM structure"

Fig.7

Vehicle ranging process"

Fig.8

Camera imaging principle"

Fig.9

Vehicle ranging model"

Fig.10

Sample partial dataset"

Fig.11

Training loss value and mAP curve"

Table 1

Results of ablation experiment"

模 型Precision/%Recall/%F1/%mAP/%FPS/(帧·s-1
YOLOX-S86.7790.7988.7593.1775.49
YOLOX-S+CBAM87.45(+0.68)91.13(+0.34)89.26(+0.51)93.62(+0.45)70.36(-5.13)
YOLOX-S+Focal Loss87.08(+0.31)91.27(+0.48)89.11(+0.36)93.89(+0.72)75.32(-0.17)
YOLOX-S+CBAM+Focal Loss87.63(+0.86)92.11(+1.32)89.84(+1.09)94.71(+1.54)70.14(-5.35)

Table 2

Results of comparison experiment"

模 型Precision/%Recall/%F1/%mAP/%FPS/(帧·s-1模型大小/MB
Fater R-CNN61.1395.3074.4992.1626.54108.29
SSD84.4584.7284.6289.0158.8792.13
YOLOv485.6863.8773.1576.5440.58244.45
YOLOv5s83.5977.3680.3777.1476.2227.17
YOLOX-S86.7790.7988.7593.1775.4934.39
改进的YOLOX-S87.6392.1189.8494.7169.1436.08

Fig.12

Sample of partial calibration images"

Table 3

Camera internal parameters"

fx /像素fy /像素u0/像素v0/像素
1 422.861 422.73963.46544.27

Fig.13

Vehicle ranging experiment scenario"

Table 4

Comparison of ranging feature points and predicted distance"

实验场景检测算法uminvminumaxvmaxuv预测纵向距离/m预测横向距离/m预测实际距离/m
图13(a)1 2764701 6416981 458.5069810.453.6511.07
1 2804721 644696.501 462696.5010.563.7211.19
图13(b)1 1844731 421634.501 302.50634.5015.243.6415.67
1 1804711 422638130163914.743.5115.15
图13(c)1 5324751 855643.501 693.50643.5014.327.3716.11
1 5294751 8516461 69064614.097.2215.83
图13(d)1 1544811 328602.501241602.5019.793.8720.16
1 1564781 3336021 244.5060319.683.8920.06
图13(e)1 3634791 5706001 466.5060020.267.1821.49
1 3594821 569602.501 46459920.417.1921.64
图13(f)1 6404801 842603.501 741603.5019.6110.7522.36
1 6404831 8446061 74260619.1310.5221.83

Table 5

Results of comparative experiment on vehicle ranging"

纵向

距离/m

横向

距离/m

实际

距离/m

预测距离/m预测误差/%
纵向距离/m横向距离/m实际距离/m纵向误差/%横向误差/%实际误差/%
Ⅰ ⅡⅠ ⅡⅠ ⅡⅠ ⅡⅠ ⅡⅠ Ⅱ
5-55.22 5.26-5.22 5.264.40 5.20-4.40 5.20
10-1010.39 10.45-10.39 10.453.90 4.50-3.90 4.50
3.7510.6810.45 10.563.65 3.7211.07 11.204.50 5.602.67 0.803.64 4.83
15-1515.57 15.63-15.57 15.633.80 4.20-3.80 4.20
3.7515.4615.24 14.743.64 3.5115.67 15.151.60 1.732.93 6.401.35 1.99
7.516.7714.32 14.097.37 7.2216.11 15.834.53 6.071.73 3.733.94 5.59
20-2019.43 20.47-19.43 20.472.85 2.35-2.85 2.35
3.7520.3519.79 19.683.87 3.8920.16 20.061.05 1.603.20 3.730.91 1.43
7.521.3620.26 20.417.18 7.1921.49 21.641.30 2.054.27 4.130.63 1.31
11.2522.9519.61 19.1310.75 10.5222.36 21.831.95 4.354.44 6.492.56 4.88
25-2524.31 24.02-24.31 24.022.76 3.92-2.76 3.92
3.7525.2826.11 26.433.57 3.6126.35 26.684.44 5.724.80 3.734.24 5.54
7.526.124.04 24.137.13 7.0225.08 25.133.84 3.484.93 6.403.93 3.71
11.2527.4123.78 26.3511.82 11.9526.56 28.934.88 5.405.07 6.223.12 5.56
30-3029.14 28.59-29.14 28.592.87 4.70-2.87 4.70
3.7530.2328.82 31.353.91 3.8729.08 31.593.93 4.504.27 3.203.79 4.49
7.530.9228.58 29.057.60 7.9129.57 30.114.73 3.171.33 5.474.36 2.63
11.2532.0430.91 31.1110.66 10.9532.70 32.983.03 3.705.24 2.672.05 2.94
35-3533.57 33.24-33.57 33.244.09 5.03-4.09 5.03
3.7535.234.29 34.433.94 3.6034.52 34.622.03 1.635.07 4.001.94 1.65
7.535.7936.13 36.637.89 7.9336.98 37.483.23 4.665.20 5.733.33 4.72
11.2536.7635.95 36.2911.56 11.4437.76 38.052.71 3.692.76 1.692.73 3.51
40-4038.52 38.76-38.52 38.763.70 3.10-3.70 3.10
3.7540.1841.69 41.943.57 3.4641.74 42.084.22 4.854.80 7.733.88 4.73
7.540.738.25 38.057.75 7.9239.03 38.874.38 4.883.33 5.604.11 4.51
11.2541.5539.26 40.9211.78 11.8540.99 42.601.85 2.304.71 5.331.35 2.53
45-4544.66 46.61-44.66 46.610.76 3.58-0.76 3.58
3.7545.1646.17 46.943.81 3.8246.33 47.102.60 4.311.60 1.872.58 4.29
7.545.6243.39 43.057.88 7.9744.10 43.783.58 4.335.07 6.273.33 4.03
11.2546.3846.50 43.2411.57 11.6047.92 44.773.33 3.912.84 3.113.32 3.47
50-5047.87 47.28-47.87 47.284.26 5.44-4.26 5.44
3.7550.1448.35 48.543.91 3.9848.51 48.703.30 2.924.27 6.133.26 2.87
7.550.5649.85 52.567.62 7.7050.43 53.120.30 5.121.60 2.670.26 5.07
11.2551.2551.18 52.9011.28 11.1952.41 54.072.36 5.800.27 0.532.26 5.50
1 刘旖菲, 胡学敏, 陈国文, 等. 视觉感知的端到端自动驾驶运动规划综述[J]. 中国图象图形学报, 2021, 26(1): 49-66.
Liu Yi-fei, Hu Xue-min, Chen Guo-wen, et al. A review of end-to-end autonomous driving motion planning with visual perception[J]. Chinese Journal of Graphical Graphics, 2021, 26(1): 49-66.
2 原晓佩, 陈小锋, 廉明. 基于Haar-like和LBP的多特征融合目标检测算法[J]. 计算机科学, 2021, 48(11): 219-225.
Yuan Xiao-pei, Chen Xiao-feng, Lian Ming. A multi-feature fusion target detection algorithm based on Haar-like and LBP[J]. Computer Science, 2021, 48(11): 219-225.
3 Lienhart R, Maydt J. An extended set of Haar-like features for rapid object detection[C]∥The IEEE International Conference on Image Processing, New York, USA, 2002: 900-903.
4 辛元雪, 史朋飞, 薛瑞阳. 基于区域提取与改进LBP特征的运动目标检测[J]. 计算机科学, 2021, 48(7): 233-237.
Xin Yuan-xue, Shi Peng-fei, Xue Rui-yang. Motion target detection based on region extraction with improved LBP features[J]. Computer Science, 2021, 48(7): 233-237.
5 Duan J, Ye H, Zhao H, et al. Deep cascade AdaBoost with unsupervised clustering in autonomous vehicles[J]. Electronics, 2022, 12(1):No.12010044.
6 Yang J, Jun Z. Improved HOG feature vehicle recognition algorithm based on sliding window[J]. Journal of Physics: Conference Series, 2020, 1627(1):No. 012013.
7 耿庆田, 于繁华, 王宇婷, 等. 基于特征融合的车型检测新算法[J]. 吉林大学学报:工学版, 2018, 48(3): 929-935.
Geng Qing-tian, Yu Fan-hua, Wang Yu-ting, et al. A new algorithm for model detection based on feature fusion[J]. Journal of Jilin University(Engineering Edition), 2018, 48(3): 929-935.
8 高明华, 杨璨. 基于改进卷积神经网络的交通目标检测方法[J]. 吉林大学学报:工学版, 2022, 52(6): 1353-1361.
Gao Ming-hua, Yang Can. An improved convolutional neural network based traffic target detection method[J]. Journal of Jilin University(Engineering Edition), 2022, 52(6): 1353-1361.
9 Redmon J, Farhadi A. YOLOv3: an incremental improvement[DB/OL].[2023-03-22]..
10 Yue Z, Wei Z, Nan L. A novel detection method using YOLOv5 for vehicle target under complex situation[J]. Traitement du Signal, 2022, 39(4): 1153-1158.
11 Guan X, Meng Y, Meng W, et al. Research on highway vehicle detection based on faster R-CNN and domain adaptation[J]. Applied Intelligence, 2022, 52(4): 3483-3498.
12 Ren S, He K, Girshick R, et al. Faster r-cnn: towards realtime object detection with region proposal networks[J]. Advances in Neural Information Processing Systems, 2015, 28: 91-99.
13 Mescheder L, Oechsle M, Niemeyer M, et al. Occupancy networks: learning 3D reconstruction in function space[C]∥Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, USA, 2019: 4460-4470.
14 黄孝慈, 舒方林, 曹文冠. 基于双目视觉的前方车辆测距方法研究[J]. 汽车技术, 2021(12): 16-21.
Huang Xiao-ci, Shu Fang-lin, Cao Wen-guan. Research on forward vehicle ranging method based on binocular vision[J]. Automotive Technology, 2021(12): 16-21.
15 Hou A L, Chen J, Jin Z J, et al. Binocular vision measurement of distance based on vehicle logo location[J]. Applied Mechanics and Materials, 2012, 229(1): 1154-1157.
16 Ho H W, Croon G D, Chu Q P. Distance and velocity estimation using optical flow from a monocular camera[J]. International Journal of Micro Air Vehicles, 2017, 9(3): 198-208.
17 高维岳, 陈宇拓, 刘洋, 等. 基于单目视觉的车辆前方障碍物测距方法[J]. 计算机工程与设计, 2022, 43(4): 1016-1022.
Gao Wei-yue, Chen Yu-tuo, Liu Yang, et al. A monocular vision-based approach to vehicle forward obstacle ranging[J]. Computer Engineering and Design, 2022, 43(4): 1016-1022.
18 Ge Z, Liu S, Wang F, et al. YOLOX: exceeding YOLO Series in 2021[DB/OL].[2023-01-10]. .
19 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.
20 Woo S, Park J, Lee J Y, et al. CBAM: convolutional block attention module[C]∥Proceedings of the European Conference on Computer Vision. Munich: Springer, 2018: 3-19.
21 Lin T, Goyal P, Girshick R, et al. Focal loss for dense object detection[C]∥IEEE International Conference on Computer Vision, Venice, Italy, 2017: 2980-2988.
22 刘佳涛, 张亚萍, 杨雨薇. 基于迁移学习的高效单目图像深度估计[J]. 激光与光电子学进展, 2022, 59(16): 236-244.
Liu Jia-tao, Zhang Ya-ping, Yang Yu-wei. Efficient monocular image depth estimation based on migration learning[J]. Advances in Lasers and Optoelectronics, 2022, 59(16): 236-244.
23 彭妍, 郭君斌, 于传强, 等. 基于平面变换的高精度相机标定方法[J]. 北京航空航天大学学报, 2022, 48(7): 1297-1303.
Peng Yan, Guo Jun-bin, Yu Chuan-qiang, et al. A high-precision camera calibration method based on planar transformation[J]. Journal of Beijing University of Aeronautics and Astronautics, 2022, 48(7): 1297-1303.
[1] Lei ZHANG,Jing JIAO,Bo-xin LI,Yan-jie ZHOU. Large capacity semi structured data extraction algorithm combining machine learning and deep learning [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(9): 2631-2637.
[2] Lu Li,Jun-qi Song,Ming Zhu,He-qun Tan,Yu-fan Zhou,Chao-qi Sun,Cheng-yu Zhou. Object extraction of yellow catfish based on RGHS image enhancement and improved YOLOv5 network [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(9): 2638-2645.
[3] Chang-jiang ZHENG,Tong-tong TAO,Zhi-chao CHEN. Cascading failure model based on adjustable redistribution of traffic flow [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(9): 2441-2450.
[4] Xiao-yue WEN,Guo-min QIAN,Hua-hua KONG,Yue-jie MIU,Dian-hai WANG. TrafficPro: a framework to predict link speeds on signalized urban traffic network [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(8): 2214-2222.
[5] Da-yi QU,Hao-min LIU,Zi-yi YANG,Shou-chen DAI. Dynamic allocation mechanism and model of traffic flow in bottleneck section based on vehicle infrastructure cooperation [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(8): 2187-2196.
[6] Yun-juan YAN,Wei-xiong ZHA,Jun-gang SHI,Li-ping YAN. Double layer optimization model of charging pile based on random charging demand [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(8): 2238-2244.
[7] Bai-you QIAO,Tong WU,Lu YANG,You-wen JIANG. A text sentiment analysis method based on BiGRU and capsule network [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(7): 2026-2037.
[8] Xin-gang GUO,Ying-chen HE,Chao CHENG. Noise-resistant multistep image super resolution network [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(7): 2063-2071.
[9] Li-ping ZHANG,Bin-yu LIU,Song LI,Zhong-xiao HAO. Trajectory k nearest neighbor query method based on sparse multi-head attention [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(6): 1756-1766.
[10] Ming-hui SUN,Hao XUE,Yu-bo JIN,Wei-dong QU,Gui-he QIN. Video saliency prediction with collective spatio-temporal attention [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(6): 1767-1776.
[11] Yu-kai LU,Shuai-ke YUAN,Shu-sheng XIONG,Shao-peng ZHU,Ning ZHANG. High precision detection system for automotive paint defects [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(5): 1205-1213.
[12] Gui-zhen CHEN,Hui-ting CHENG,Cai-hua ZHU,Yu-ran LI,Yan LI. A risk evaluation method for urban intersections considering drivers' physiological information [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(5): 1277-1284.
[13] Ren-xiang CHEN,Chao-chao HU,Xiao-lin HU,Li-xia YANG,Jun ZHANG,Jia-le HE. Driver distracted driving detection based on improved YOLOv5 [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(4): 959-968.
[14] Xiao-hua ZHAO,Chang LIU,Hang QI,Ju-shang OU,Ying YAO,Miao GUO,Hai-yi YANG. Influencing factors and heterogeneity analysis of highway traffic accidents [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(4): 987-995.
[15] Xiu-jian YANG,Xiao-han JIA,Sheng-bin ZHANG. Characteristics of mixed traffic flow taking account effect of dynamics of vehicular platoon [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(4): 947-958.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!