| With the continuous development of my country’s market economy,the number of vehicles in the country continues to grow rapidly.People’s traffic travel demand is increasing day by day.As an important part of the urban road network,tunnels undertake the important task of alleviating traffic pressure.The study found that one of the important factors affecting the safe operation of tunnels is the occurrence of foreign object intrusion events.Therefore,how to accurately and efficiently detect such events in tunnel scenarios is one of the topics concerned by relevant departments.Traditional methods have the disadvantages of low recognition accuracy and slow detection rate.In response to these problems,this thesis uses deep learning technology to apply the target detection algorithm in deep learning to foreign object detection in urban tunnels.The main work is as follows:1.In view of the fact that the collected incidents of foreign matter intrusion in the tunnel occur less overall,and the number of foreign matter between different categories also has a large difference,this thesis integrates the Self-attention mechanism with the GAN data expansion model,and combines it with different traditional images.Data augmentation methods are combined to form a new image data augmentation method.This method is applied to the foreign object image data of 27 tunnels in Nanjing with a small amount of data in one and a half years,and the overall data expansion is carried out,and the foreign object data with a small proportion of categories is further expanded to achieve the overall Balance of category proportions.The test results show that:(1)The average FID value of the Self-attention GAN model in this thesis is 10.13 lower than the average FID value of the GAN model,indicating that the quality of the expanded data has been improved;(2)The expanded data set under the Self-attention GAN method Compared with the traditional method to expand the dataset,the average detection accuracy is increased by 4.53 percentage points under the same target detector,which shows the effectiveness of the method in this thesis.2.Aiming at the low accuracy of foreign object detection in the tunnel scene,this thesis improves the original YOLOv7 model and proposes a new foreign object detection algorithm.In terms of loss function,the SIo U function is used to solve the problem of slow convergence of the YOLOv7 model during training.In terms of the neck structure,the Bi FPN network structure is introduced to improve the perception of targets of different scales,thereby improving the detection accuracy of targets of different scales.Experiments were carried out on the data set expanded by the Self-attention GAN method in 1.The results show that: compared with the original YOLOv7 model,the average detection accuracy of various foreign objects has increased from 56.05% to 70.78%,and the category with the highest detection accuracy is box-shaped.object,the accuracy under the category reached 76.88%.3.In view of the large amount of calculations for processing real-time video stream data under the condition of limited resources,which makes the model difficult to apply in practice,this thesis combines the Network Slimming algorithm and the INT8 quantization algorithm based on KL divergence to propose a new model compression method.The new method compresses the trained target detection model.Although the compressed model loses certain accuracy,it can process realtime video data more quickly.The experimental results show that: compared with the original trained target detection model,when the pruning rate of the Network Slimming algorithm in the combined algorithm is 20%,the average detection accuracy drops from 70.78% to 64.92%,but the model volume decreases from 146.52 MB to 29.02 MB,the detection speed FPS increased from 16.72/s to29.52/s,which can meet the needs of the actual application of the model. |