| The ultimate goal of autonomous driving technology is unmanned driving,and environmental perception is an important part of unmanned driving technology.Vehicle and pedestrian detection is a major component of environmental perception technology.Due to the complexity of intelligent vehicle driving scenarios,the scene adaptability of existing vehicle and pedestrian detection algorithms is not ideal.Therefore,according to the update of the algorithm structure and the change of application scenarios,this paper designs a background differential vehicle detection algorithm based on Bayesian estimation and a pedestrian detection algorithm based on the dedicated attention mechanism.It’s contents are as follows:(1)Construct a background differential vehicle detection algorithm based on Bayesian estimation.First,the algorithm divides the background image and the foreground image by sampling,and makes the difference between the detection image and the background image to obtain the difference image.Secondly,use Bayesian estimation to calculate the posterior distribution of the pixel points of the tested image and the prior distribution of the vehicle in the field,obtain the area of the moving vehicle in the image,use the sift algorithm to find the contour belonging to the moving vehicle,and process the information of the vehicle contour,find the spatial extreme points at all scales.Finally,the Gaussian difference is used to identify the points of interest,calculate the local gradient of the key point field in the image,and reduce the range of the contour by removing unstable points and edge responses,and finally detect the vehicle in the image.Finally,compared with the background difference method without Bayesian estimation,the accuracy of the proposed algorithm is 11.4%higher.(2)A pedestrian detection algorithm based on a dedicated attention mechanism is proposed.A dedicated attention mechanism for pedestrian features is designed,which can filter out feature images other than pedestrian features.The concept of feature image modularization is established.The advantages and disadvantages of batch normalization and layer normalization are compared,and according to pedestrian characteristics,batch normalization for common features of different samples is selected to process triplet vectors in the transformer framework.In the transformer framework,comparing the performance of resnet and Dropout in dealing with overfitting,it is found that the accuracy of Dropout and the floating point number of operations per second are the lowest,which are 69.3% and 157 m,respectively.The resnet50 has the highest accuracy and FLOPS values,reaching 75.5% and 356 m.Comparing the pedestrian detection algorithm proposed in this paper and the performance of the RNN with the resnet residual neural network module,it is found that the accuracy of the RNN with R18 is 70.2%,the number of floating-point operations per second is 185 m,and the accuracy is 1.3% lower than this algorithm.The number of floating point operations per second is 7m lower.The accuracy of the pedestrian detection algorithm with R34 reaches 74.3%,the number of floating-point operations per second is 307,the accuracy is 1.3% higher than that of the RNN algorithm,and the number of floating-point operations per second is 22 m higher.Feature mapping improves the accuracy of the algorithm by 1.8~3.9%,and reduces FLOPS by 23~39%.(3)Validate the two proposed algorithms in four weather environments(sunny,night,rainy,and foggy).In the vehicle detection algorithm,the vehicle under test can be accurately detected in sunny and night weather conditions.The reflection generated by the road surface in rainy days will lead to false detection,and the detection in the case of low visibility in foggy days will fail.In the future,the algorithm needs to be optimized for rainy and foggy days.and improve.After adding salt and pepper noise with an intensity of 0.2 as an interference source,the vehicle under test can still be accurately detected in sunny and night weather conditions.Because the reflection generated by the road in rainy days is occupied by salt and pepper noise,the contour of the vehicle in the reflection is incomplete,resulting in the disappearance of false detection.The soaring of 0 pixels in foggy days leads to a significant drop in the accuracy of the algorithm.In the future,the algorithm needs to be optimized for rainy and foggy days.In the pedestrian detection algorithm,it has good performance in sunny days,nights,rainy days and foggy days,but the items carried by pedestrians and the umbrellas held up are not detected.After adding salt and pepper noise with an intensity of 0.2 as an interference source,pedestrians in all images can still be detected,but the performance of the attention mechanism is weakened.In the future,the global detection of pedestrian features by the dedicated attention mechanism can be changed to local focus detection.In summary,the two algorithms designed and constructed in this paper show good results in the same category of algorithms,and the rationality of the proposed algorithm and the necessity of the module are verified by removing a certain module in the algorithm framework.The overall performance of the algorithm remains good in different scenarios.However,extreme weather exposes the shortcomings of the algorithm and needs to be improved in a targeted manner. |