| In the intelligent vehicle perception task,two-wheeled vehicles,such as motorcycles,two-wheeled electric vehicles and bicycles,have received less attention than cars.However,the large number of two-wheeled vehicles,fast acceleration and changeable driving trajectories pose a great threat to urban traffic safety.In the target detection algorithm based on deep learning,foreign public data sets are mostly used as training data sets.In these sets,twowheeled vehicles are mostly motorcycles,and two-wheeled vehicles in domestic traffic scenes are mostly electric vehicles and bicycles.Therefore,directly using foreign datasets to train detection models for domestic traffic environment detection will affect the detection effect.This paper proposes a target detection and safe distance warning algorithm considering two-wheeled vehicles.The main work of this paper is as follows:(1)A traffic dataset considering domestic two-wheeled vehicles is constructed.First,this paper analyzes the deficiencies of currently existing public datasets.Then,through a series of processes including collecting road pictures,manual screening,subsampling,and manual labeling,a two-wheeled vehicle dataset in domestic traffic scenarios was produced.After that,this paper modifies and screens the public data set.The filtered images are merged with the traffic data set focusing on two-wheeled vehicles.and a traffic data set considering domestic two-wheeled vehicles is constructed,which containing 10,037 images.(2)This paper designs a target detection network optimization model based on YOLOv5s algorithm and conduct training and detection experiments.three kinds of input processing are used for the input image,including data enhancement,adaptive scaling and adaptive anchor box.The network structure of YOLOv5s has been improved.The improvements mainly includes using the SiLU activation function to replace the original activation function,using the C3 module to replace the CSP module,using the single-layer convolution module to replace the Focus module,improving the SPP module to SPPF module.Training experiment shows that the improved model has improved in precision rate,mAP,F1 and other indicators and the precision rate reaches 92.8%.Detection experiments show that the improved model has significantly improved detection ability for long-distance occluded objects and can cope with complex lighting conditions and traffic scene detection in different weather.(3)This paper establishes a safe distance early warning algorithm based on hybrid ranging.First,the camera is calibrated using Zhang Zhengyou’s calibration algorithm.And then,a binocular infrared ranging model and a monocular ranging model based on road contact points are established,in which the monocular experiment uses the lower edge vertex of the detection box as the road contact point.After that,the ranging errors of the two algorithms are analyzed through experiments.The experiments show that the binocular infrared ranging model can only measure the distance within 10 meters,and the error is great within 8 meters.As the distance increases,it will decrease and then increase,the minimum value is obtained near 8 meters.According to the above differences,this paper designs a safe distance warning algorithm,using infrared distance measurement and distance warning within 8 meters,and using monocular distance measurement outside 8 meters.Finally,it is proved by experiments that it can perform real-time detection,ranging and warning reminders for cars,two-wheeled vehicles,and pedestrians of different scales and attitudes. |