| In recent years,computer vision algorithms based on convolutional neural networks,which are more widely used in industry and life,have made great progress.This thesis aims at improving the existing excellent object detection algorithm and applying it to solve the problems of vehicle detection in roadside parking scenarios.YOLOv5 is used as the baseline.The network is not only optimized for the roadside parking scenarios,but also further improved based on some universal methods.Besides,this thesis appropriately filters classes in the public dataset and made a roadside parking scene dataset to evaluate the modified algorithm under more realistic conditions.Firstly,this thesis optimizes the network for the roadside parking scenario specially.The similarity between feature maps is evaluated by the cosine distance,and it is pointed out that when the categories are fewer and more similar,or the scenes are more approximate,feature maps are more similar as well.By replacing the residual blocks with the Ghost Block,this thesis reduces parameters and floating-point operations 1.236 M and1G respectively without obvious change in detection accuracy.This thesis also studies the contribution of each layer’s detection head to the final results and finds that in the scenes of roadside parking and vehicle detection,the detection head at lower layers rarely outputs detected objects.Simplifying the detection head reduces inference time by 2%,while m AP is raised by 1.3%.In addition,this thesis studies how post-processing algorithms work when a large number of objects overlap severely,finding that NMS performs poorly under these circumstances,and may select prediction boxes without good regression.The original post-processing algorithm is replaced by the Confluence algorithm with fewer missing detections of vehicles and a 0.8% m AP increase.Meanwhile,this thesis increases the threshold of post-processing algorithms to meet the needs of practical use,rather than aims at the recall rate of small objects in public datasets desperately.In addition,this thesis further optimizes the network based on some universal methods.Without changing any structure,accuracy is raised by modifying the training and data preprocessing strategy.This thesis optimizes the label assignment through optimal transport,which leads to a 0.3% m AP increase.Combined with modified label assignment,replacing BCE Loss with Focal Loss results in a 0.2% m AP increase.By adding Drop Block regularization in the neck of the network,the m AP rises by 1%.To mitigate the harm of the inferior bounding box produced by data augmentation algorithms,this thesis adjusts the data augmentation strategy,which contributes to a 1.6% m AP increase.This thesis proposes several methods to improve the general object detection algorithm for vehicle detection and verifies them through experiments. |